Code:
////////////////////////////////////////////////////////////////
// Event delegate for 'searchpanel' event
proc Customers_section1_searchpanel()
sp_container = createObject("container")
sp_container.addObject("sp_label", "label")
sp_label.move(5, 3, 80, 20)
sp_label.text = "Company Name"
sp_container.addObject("osp_textbox", "textbox")
sp_textbox = osp_textbox
osp_textbox.move(85, 3, 100, 20)
sp_container.addObject("sp_search", "commandbutton")
sp_search.move(190, 3, 60, 20)
sp_search.text = "Search"
sp_search.click = sp_search_handler
sp_container.addObject("sp_clear", "commandbutton")
sp_clear.move(255, 3, 60, 20)
sp_clear.text = "Reset"
sp_clear.click = sp_reset_handler
this.addSearchPanel(sp_container)
this.addProperty("SearchPanel",sp_container) // Add reference to the object as a property
endproc
////////////////////////////////////////////////////////////////
// handlers for the Search Panel
proc sp_search_handler()
Lianja.showDocument("section:section1?action=search&text="+sp_textbox.text)
endproc
proc sp_reset_handler()
Lianja.showDocument("section:section1?action=search&text=")
sp_textbox.text = ""
endproc
Bookmarks