Create basepage
This commit is contained in:
35
examples/widgetapp/base_page.e
Normal file
35
examples/widgetapp/base_page.e
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
note
|
||||||
|
description: "Summary description for {BASE_PAGE}."
|
||||||
|
author: ""
|
||||||
|
date: "$Date$"
|
||||||
|
revision: "$Revision$"
|
||||||
|
|
||||||
|
deferred class
|
||||||
|
BASE_PAGE
|
||||||
|
|
||||||
|
inherit
|
||||||
|
|
||||||
|
WSF_PAGE_CONTROL
|
||||||
|
|
||||||
|
feature
|
||||||
|
|
||||||
|
initialize_controls
|
||||||
|
local
|
||||||
|
navbar: WSF_NAVBAR_CONTROL
|
||||||
|
do
|
||||||
|
create container.make_multi_control ("container")
|
||||||
|
container.add_class ("container")
|
||||||
|
create navbar.make_navbar ("Sample Page")
|
||||||
|
navbar.add_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/%"", "Home"))
|
||||||
|
navbar.add_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/grid%"", "Grid"))
|
||||||
|
navbar.add_element (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"/repeater%"", "Repeater"))
|
||||||
|
navbar.add_element_right (create {WSF_BASIC_CONTROL}.make_with_body ("a", "href=%"#%"", "About"))
|
||||||
|
container.add_control (navbar)
|
||||||
|
control:=container
|
||||||
|
end
|
||||||
|
|
||||||
|
feature
|
||||||
|
|
||||||
|
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||||
|
|
||||||
|
end
|
||||||
@@ -9,7 +9,10 @@ class
|
|||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_PAGE_CONTROL
|
BASE_PAGE
|
||||||
|
redefine
|
||||||
|
initialize_controls
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -17,11 +20,8 @@ create
|
|||||||
feature
|
feature
|
||||||
|
|
||||||
initialize_controls
|
initialize_controls
|
||||||
local
|
|
||||||
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
|
||||||
do
|
do
|
||||||
create container.make_multi_control ("container")
|
Precursor
|
||||||
container.add_class ("container")
|
|
||||||
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h1","","Grid Demo"))
|
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h1","","Grid Demo"))
|
||||||
create datasource.make_news
|
create datasource.make_news
|
||||||
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||||
|
|||||||
@@ -6,9 +6,13 @@ note
|
|||||||
|
|
||||||
class
|
class
|
||||||
REPEATER_PAGE
|
REPEATER_PAGE
|
||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_PAGE_CONTROL
|
BASE_PAGE
|
||||||
|
redefine
|
||||||
|
initialize_controls
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -16,11 +20,8 @@ create
|
|||||||
feature
|
feature
|
||||||
|
|
||||||
initialize_controls
|
initialize_controls
|
||||||
local
|
|
||||||
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
|
||||||
do
|
do
|
||||||
create container.make_multi_control ("container")
|
Precursor
|
||||||
container.add_class ("container")
|
|
||||||
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h1","","Repeater Demo"))
|
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h1","","Repeater Demo"))
|
||||||
create datasource.make_news
|
create datasource.make_news
|
||||||
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||||
@@ -30,7 +31,6 @@ feature
|
|||||||
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h2","","Results"))
|
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h2","","Results"))
|
||||||
create repeater.make_repeater ("myrepeater", datasource)
|
create repeater.make_repeater ("myrepeater", datasource)
|
||||||
container.add_control (repeater)
|
container.add_control (repeater)
|
||||||
control := container
|
|
||||||
end
|
end
|
||||||
|
|
||||||
change_query
|
change_query
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ class
|
|||||||
|
|
||||||
inherit
|
inherit
|
||||||
|
|
||||||
WSF_PAGE_CONTROL
|
BASE_PAGE
|
||||||
|
redefine
|
||||||
|
initialize_controls
|
||||||
|
end
|
||||||
|
|
||||||
create
|
create
|
||||||
make
|
make
|
||||||
@@ -18,8 +21,6 @@ feature
|
|||||||
|
|
||||||
initialize_controls
|
initialize_controls
|
||||||
local
|
local
|
||||||
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
|
||||||
navbar: WSF_NAVBAR_CONTROL
|
|
||||||
n1_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
n1_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||||
n2_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
n2_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||||
n3_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
n3_container: WSF_FORM_ELEMENT_CONTROL [STRING]
|
||||||
@@ -27,20 +28,15 @@ feature
|
|||||||
|
|
||||||
s: FLAG_AUTOCOMPLETION
|
s: FLAG_AUTOCOMPLETION
|
||||||
do
|
do
|
||||||
|
Precursor
|
||||||
create s.make (<<["dz", "Algeria"], ["be", "Belgium"], ["ca", "Canada"], ["de", "Deutschland"], ["england", "England"], ["fi", "Finland"], ["gr", "Greece"], ["hu", "Hungary"]>>)
|
create s.make (<<["dz", "Algeria"], ["be", "Belgium"], ["ca", "Canada"], ["de", "Deutschland"], ["england", "England"], ["fi", "Finland"], ["gr", "Greece"], ["hu", "Hungary"]>>)
|
||||||
create container.make_multi_control ("container")
|
|
||||||
container.add_class ("container")
|
|
||||||
create navbar.make_navbar ("Sample Page")
|
|
||||||
create textbox1.make_input ("txtBox1", "1")
|
create textbox1.make_input ("txtBox1", "1")
|
||||||
create textbox2.make_input ("txtBox2", "2")
|
create textbox2.make_input ("txtBox2", "2")
|
||||||
create autocompletion1.make_autocomplete ("autocompletion1", s)
|
create autocompletion1.make_autocomplete ("autocompletion1", s)
|
||||||
create button1.make_button ("sample_button1", "SUM")
|
create button1.make_button ("sample_button1", "SUM")
|
||||||
create textbox_result.make_html ("txtBox3", "p", "")
|
create textbox_result.make_html ("txtBox3", "p", "")
|
||||||
create progress.make_progress ("progress1")
|
create progress.make_progress ("progress1")
|
||||||
navbar.add_element (create {WSF_BASIC_CONTROL}.make_with_body("a","href=%"/%"","Home"))
|
|
||||||
navbar.add_element (create {WSF_BASIC_CONTROL}.make_with_body("a","href=%"/grid%"","Grid"))
|
|
||||||
navbar.add_element (create {WSF_BASIC_CONTROL}.make_with_body("a","href=%"/repeater%"","Repeater"))
|
|
||||||
navbar.add_element_right (create {WSF_BASIC_CONTROL}.make_with_body("a","href=%"#%"","About"))
|
|
||||||
button1.set_click_event (agent handle_click)
|
button1.set_click_event (agent handle_click)
|
||||||
button1.add_class ("col-lg-offset-2")
|
button1.add_class ("col-lg-offset-2")
|
||||||
create form.make_form_control ("panel")
|
create form.make_form_control ("panel")
|
||||||
@@ -63,10 +59,9 @@ feature
|
|||||||
form.add_control (cats_container)
|
form.add_control (cats_container)
|
||||||
form.add_control (button1)
|
form.add_control (button1)
|
||||||
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Result", textbox_result))
|
form.add_control (create {WSF_FORM_ELEMENT_CONTROL [STRING]}.make_form_element ("Result", textbox_result))
|
||||||
container.add_control (navbar)
|
|
||||||
container.add_control (form)
|
container.add_control (form)
|
||||||
container.add_control (progress)
|
container.add_control (progress)
|
||||||
control := container
|
|
||||||
end
|
end
|
||||||
|
|
||||||
handle_click
|
handle_click
|
||||||
|
|||||||
Reference in New Issue
Block a user