From d45405f261ba42d359cad100584cff889caa9fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Severin=20M=C3=BCnger?= Date: Fri, 6 Sep 2013 20:36:04 +0200 Subject: [PATCH] Some small changes --- examples/widgetapp/sample_page.e | 22 ++++++++----------- .../server/wsf_html/webcontrol/wsf_control.e | 6 ++--- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/examples/widgetapp/sample_page.e b/examples/widgetapp/sample_page.e index a4040ada..6aec5cdf 100644 --- a/examples/widgetapp/sample_page.e +++ b/examples/widgetapp/sample_page.e @@ -10,10 +10,6 @@ class inherit WSF_PAGE_CONTROL - redefine - initialize_controls, - process - end create make @@ -31,26 +27,26 @@ feature button1.set_click_event (agent handle_click) create form.make_form_control ("panel") form.add_class ("form-horizontal") - create cklist.make_checkbox_list_control("categories") - cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox("net","Network","net")) - cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox("os","Operating Systems","os")) - form.add_control (create {WSF_FORM_ELEMENT_CONTROL[STRING]}.make_form_element("Number1",textbox1)) - form.add_control (create {WSF_FORM_ELEMENT_CONTROL[STRING]}.make_form_element("Number2",textbox2)) - form.add_control (create {WSF_FORM_ELEMENT_CONTROL[LIST[STRING]]}.make_form_element("Categories",cklist)) + create cklist.make_checkbox_list_control ("categories") + cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("net", "Network", "net")) + cklist.add_control (create {WSF_CHECKBOX_CONTROL}.make_checkbox ("os", "Operating Systems", "os")) + form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Number1", textbox1)) + form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Number2", textbox2)) + form.add_control (create {WSF_FORM_ELEMENT_CONTROL [LIST [STRING]]}.make_form_element ("Categories", cklist)) form.add_control (button1) - form.add_control (create {WSF_FORM_ELEMENT_CONTROL[STRING]}.make_form_element("Result",textbox_result)) + form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Result", textbox_result)) control := form end handle_click local - text:STRING + text: STRING do text := textbox1.text + " + " + textbox2.text + " = " + (textbox1.text.to_integer_16 + textbox2.text.to_integer_16).out across cklist.value as s loop - text.append ("%N-"+s.item) + text.append ("%N-" + s.item) end textbox_result.set_text (text) end diff --git a/library/server/wsf_html/webcontrol/wsf_control.e b/library/server/wsf_html/webcontrol/wsf_control.e index 8a092305..9032e940 100644 --- a/library/server/wsf_html/webcontrol/wsf_control.e +++ b/library/server/wsf_html/webcontrol/wsf_control.e @@ -88,14 +88,14 @@ feature loop css_classes_string := css_classes_string + " " + c.item end - Result:=render_tag_with_tagname(tag_name,body,attributes,css_classes_string) + Result := render_tag_with_tagname (tag_name, body, attributes, css_classes_string) end - render_tag_with_tagname (tag, body, attributes,css_classes_string: STRING): STRING + render_tag_with_tagname (tag, body, attributes, css_classes_string: STRING): STRING local l_attributes: STRING do - l_attributes:=attributes + l_attributes := attributes if not css_classes_string.is_empty then l_attributes := " class=%"" + css_classes_string + "%"" end