Fix multi control
Use multi control in example
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user