Merge branch 'widget_grid' into widget
Conflicts: examples/widgetapp/widget.coffee examples/widgetapp/widget.js
This commit is contained in:
@@ -18,17 +18,37 @@ feature
|
||||
|
||||
initialize_controls
|
||||
local
|
||||
ds: DEMO_DATASOURCE
|
||||
container: WSF_MULTI_CONTROL [WSF_STATELESS_CONTROL]
|
||||
do
|
||||
create ds.make_demo
|
||||
create grid.make_grid ("mygrid", <<create {WSF_GRID_COLUMN}.make_column ("#", "id"), create {WSF_GRID_COLUMN}.make_column ("Name", "name"), create {WSF_GRID_COLUMN}.make_column ("Description", "description")>>, ds)
|
||||
control := grid
|
||||
create container.make_multi_control ("container")
|
||||
container.add_class ("container")
|
||||
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h1","","Grid Demo"))
|
||||
create datasource.make_news
|
||||
create search_query.make_autocomplete ("query", create {GOOGLE_AUTOCOMPLETION}.make)
|
||||
search_query.add_class ("form-control")
|
||||
search_query.set_change_event (agent change_query)
|
||||
container.add_control (search_query)
|
||||
container.add_control (create {WSF_BASIC_CONTROL}.make_with_body("h2","","Results"))
|
||||
create grid.make_grid ("mygrid", <<create {WSF_GRID_COLUMN}.make_column ("Title", "title"), create {WSF_GRID_COLUMN}.make_column ("Content", "content")>>, datasource)
|
||||
container.add_control (grid)
|
||||
control := container
|
||||
end
|
||||
|
||||
change_query
|
||||
do
|
||||
datasource.set_query (search_query.value)
|
||||
datasource.set_page (1)
|
||||
datasource.update
|
||||
end
|
||||
|
||||
process
|
||||
do
|
||||
end
|
||||
|
||||
grid: WSF_GRID_CONTROL [DEMO_DATA]
|
||||
grid: WSF_GRID_CONTROL [GOOGLE_NEWS]
|
||||
|
||||
search_query: WSF_AUTOCOMPLETE_CONTROL
|
||||
|
||||
datasource: GOOGLE_NEWS_DATASOURCE
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user