diff --git a/library/server/wsf_html/webcontrol/wsf_button_control.e b/library/server/wsf_html/webcontrol/wsf_button_control.e index 8f7aea10..808be0af 100644 --- a/library/server/wsf_html/webcontrol/wsf_button_control.e +++ b/library/server/wsf_html/webcontrol/wsf_button_control.e @@ -18,7 +18,6 @@ feature {NONE} make (n: STRING; v: STRING) do - make_control control_name := n text := v click_event := agent donothing diff --git a/library/server/wsf_html/webcontrol/wsf_control.e b/library/server/wsf_html/webcontrol/wsf_control.e index 04f9c830..40e61b3a 100644 --- a/library/server/wsf_html/webcontrol/wsf_control.e +++ b/library/server/wsf_html/webcontrol/wsf_control.e @@ -7,18 +7,11 @@ note deferred class WSF_CONTROL -feature {NONE} - - make_control - do - control_name := "" - end - feature control_name: STRING -feature {WSF_PAGE_CONTROL} +feature {WSF_PAGE_CONTROL, WSF_CONTROL} handle_callback (event: STRING; cname: STRING; page: WSF_PAGE_CONTROL) deferred diff --git a/library/server/wsf_html/webcontrol/wsf_multi_control.e b/library/server/wsf_html/webcontrol/wsf_multi_control.e new file mode 100644 index 00000000..00a14fa9 --- /dev/null +++ b/library/server/wsf_html/webcontrol/wsf_multi_control.e @@ -0,0 +1,62 @@ +note + description: "Summary description for {WSF_MULTI_CONTROL}." + author: "" + date: "$Date$" + revision: "$Revision$" + +class + WSF_MULTI_CONTROL + +inherit + + WSF_CONTROL + +create + make + +feature {NONE} + + controls: LIST [WSF_CONTROL] + + make (n: STRING) + do + control_name := n + controls := create {LINKED_LIST [WSF_CONTROL]}.make; + end + + handle_callback (event: STRING; cname: STRING; page: WSF_PAGE_CONTROL) + do + if equal (cname, control_name) then + + else + across + controls as c + loop + c.item.handle_callback(event, cname, page) + end + end + end + + render: STRING + do + Result := "" + across + controls as c + loop + Result := Result + c.item.render + end + end + + state: JSON_OBJECT + local + temp: JSON_OBJECT + do + create Result.make + across + controls as c + loop + temp := c.item.state + end + end + +end