Fix multi control

Use multi control in example
This commit is contained in:
YNH Webdev
2013-08-28 11:04:54 +02:00
parent f14ea29636
commit b72e6871e8
4 changed files with 56 additions and 22 deletions

View File

@@ -10,13 +10,16 @@ class
inherit
WSF_CONTROL
redefine
read_state
end
create
make
feature {NONE}
controls: LIST [WSF_CONTROL]
controls: LINKED_LIST [WSF_CONTROL]
make (n: STRING)
do
@@ -24,15 +27,21 @@ feature {NONE}
controls := create {LINKED_LIST [WSF_CONTROL]}.make;
end
feature
add_control (c: WSF_CONTROL)
do
controls.put_front (c)
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)
c.item.handle_callback (event, cname, page)
end
end
end
@@ -59,4 +68,13 @@ feature {NONE}
end
end
read_state (states: JSON_OBJECT)
do
states.put (state, create {JSON_STRING}.make_json (control_name))
across
controls as c
loop
c.item.read_state(states)
end
end
end