Created first working sample page application.
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
note
|
note
|
||||||
description: "simple application root class"
|
description : "simple application root class"
|
||||||
date: "$Date$"
|
date : "$Date$"
|
||||||
revision: "$Revision$"
|
revision : "$Revision$"
|
||||||
|
|
||||||
class
|
class
|
||||||
APPLICATION
|
APPLICATION
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_DEFAULT_SERVICE
|
WSF_DEFAULT_SERVICE
|
||||||
redefine
|
redefine
|
||||||
initialize
|
initialize
|
||||||
@@ -27,11 +26,13 @@ feature {NONE} -- Initialization
|
|||||||
feature -- Basic operations
|
feature -- Basic operations
|
||||||
|
|
||||||
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||||
|
local
|
||||||
|
page: SAMPLE_PAGE
|
||||||
do
|
do
|
||||||
-- To send a response we need to setup, the status code and
|
-- To send a response we need to setup, the status code and
|
||||||
-- the response headers.
|
-- the response headers.
|
||||||
res.put_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/plain"], ["Content-Length", "11"]>>)
|
create page.make(req, res)
|
||||||
res.put_string ("Hello World 99 just another mod")
|
page.execute
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
41
examples/widgetapp/sample_page.e
Normal file
41
examples/widgetapp/sample_page.e
Normal 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
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
|
||||||
<library name="http" location="..\..\library\network\protocol\http\http-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" location="..\..\library\server\wsf\wsf-safe.ecf"/>
|
||||||
|
<library name="wsf_html" location="..\..\library\server\wsf_html\wsf_html-safe.ecf"/>
|
||||||
</target>
|
</target>
|
||||||
<target name="widgetapp_nino" extends="common">
|
<target name="widgetapp_nino" extends="common">
|
||||||
<root class="APPLICATION" feature="make_and_launch"/>
|
<root class="APPLICATION" feature="make_and_launch"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user