First working callback

This commit is contained in:
YNH Webdev
2013-08-28 00:04:42 +02:00
parent ef34217a6d
commit cb7f1f0ee3
7 changed files with 191 additions and 17 deletions

View File

@@ -31,16 +31,21 @@ feature
do
end
handle_callback (event: STRING; cname: STRING; page: WSF_PAGE_CONTROL)
set_click_event (e: PROCEDURE [ANY, TUPLE [WSF_PAGE_CONTROL]])
do
if Current.control_name = cname and attached click_event then
click_event := e
end
handle_callback (cname: STRING; event: STRING; page: WSF_PAGE_CONTROL)
do
if Current.control_name.is_equal (cname) and attached click_event then
click_event.call ([page])
end
end
render: STRING
do
Result := "<button>" + text + "</button>"
Result := "<button data-name=%"" + control_name + "%" data-type=%"WSF_BUTTON_CONTROL%">" + text + "</button>"
end
state: JSON_OBJECT