Created first working sample page application.

This commit is contained in:
Severin Münger
2013-08-27 16:48:20 +02:00
parent 1a1df35ff1
commit ab7ee8e4c3
3 changed files with 51 additions and 8 deletions

View File

@@ -1,13 +1,12 @@
note
description: "simple application root class"
date: "$Date$"
revision: "$Revision$"
description : "simple application root class"
date : "$Date$"
revision : "$Revision$"
class
APPLICATION
inherit
WSF_DEFAULT_SERVICE
redefine
initialize
@@ -27,11 +26,13 @@ feature {NONE} -- Initialization
feature -- Basic operations
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
local
page: SAMPLE_PAGE
do
-- To send a response we need to setup, the status code and
-- the response headers.
res.put_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/plain"], ["Content-Length", "11"]>>)
res.put_string ("Hello World 99 just another mod")
-- To send a response we need to setup, the status code and
-- the response headers.
create page.make(req, res)
page.execute
end
end

View File

@@ -0,0 +1,41 @@
note
description: "Summary description for {SAMPLE_PAGE}."
author: ""
date: "$Date$"
revision: "$Revision$"
class
SAMPLE_PAGE
inherit
WSF_PAGE_CONTROL
redefine
initialize_controls,
process
end
create
make
feature
initialize_controls
do
button := create {WSF_BUTTON_CONTROL}.make ("sample_button", "I'm a button")
control := button
end
handle_click(context: WSF_PAGE_CONTROL)
do
if attached {SAMPLE_PAGE} context as sp then
sp.button.set_text("Hello World! (Ueeee)")
end
end
process
do
end
button: WSF_BUTTON_CONTROL
end

View File

@@ -12,6 +12,7 @@
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf"/>
<library name="wsf" location="..\..\library\server\wsf\wsf-safe.ecf"/>
<library name="wsf_html" location="..\..\library\server\wsf_html\wsf_html-safe.ecf"/>
</target>
<target name="widgetapp_nino" extends="common">
<root class="APPLICATION" feature="make_and_launch"/>