Skip to content
ynh edited this page Nov 11, 2013 · 1 revision

The main goal of this module is to provide easy to use javascript/html widget (controls), which allow the developer to build dynamic interfaces without the need to code javascript code. The wsf_js_widget module creates the illusion of a shared state between client and server, this illusion is created by restoring the clients state in the beginning of each request.

The wsf_js_widget module provides so called "statefull" controls which can be modified on callback (when a callback event is triggered e.g the client presses a button). The callbacks can be fully defined in Eiffel using agents.

###Control initialization

create result_html.make ("p", "")
create button.make ("Update text")
button.set_click_event (agent handle_click)

###Callback implementation

handle_click
    do
        result_html.set_html("Hello world")
    end

Clone this wiki locally