Added WSF_MULTI_CONTROL to support controls that consist of multiple separate controls.

This commit is contained in:
Severin Münger
2013-08-27 22:06:08 +02:00
parent ab7ee8e4c3
commit ef34217a6d
3 changed files with 63 additions and 9 deletions

View File

@@ -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