// Use WebApplication.pkg // This is your webapplication Use WebAppFramework.nui object oDefaultPageLayout is a WebLayoutTable set psTableStyle to "width:994px" send begin_cells send add_cell 0 0 0 0 "topbar" 0 set span_values to 0 2 set class_and_style to "" "background-color:#8080c0;height:50px;vertical-align:top" send add_cell 1 0 0 0 "leftmenu" 0 set class_and_style to "" "background-color:#e4e4e4;height:668px;vertical-align:top;width:130px" send add_cell 1 1 0 0 "main" 0 set class_and_style to "" "background-color:#f8f8f8;vertical-align:top;text-align:center;width:864px" send add_cell 2 0 0 0 "bottombar" 0 set span_values to 0 2 set class_and_style to "" "background-color:#c0c0c0;height:30px;vertical-align:top" send end_cells end_object object oMyFirstWebModule is a WebModule set psModuleName to "mymodule" set psDefaultPage to "mypage" procedure DoLeftMenu send WebQuickMenu_Reset send WebQuickMenu_AddLinkInt "There" "mymodule" "there" "" send WebQuickMenu_AddLinkInt "Really" "mymodule" "really" "" send WebQuickMenu_AddLinkInt "Is" "mymodule" "isnt" "" send WebQuickMenu_AddLinkInt "No" "mymodule" "any" "" send WebQuickMenu_AddLinkInt "Menu" "mymodule" "pages" "" send WebQuickMenu_AddLinkInt "Here" "mymodule" "here" "" send WebQuickMenu_WriteHtml MS_VERTICAL end_procedure procedure DoBottomBar string lsTime move (TS_ConvertToString(TS_SysTime())) to lsTime send XHTML_Add_Open_Element "table" send XHTML_Add_Attribute "style" "width:100%" send XHTML_Add_Open_Element "tr" send XHTML_Add_Closed_Element "td" "Web application stub ver 1.0" send XHTML_Add_Attribute "style" "width:300px;text-align:left;padding-left:10px" send XHTML_Add_Closed_Element "td" ("Server time: "+lsTime) send XHTML_Add_Attribute "style" "text-align:center" send XHTML_Add_Closed_Element "td" "Copyright Good Fun Enterprises, 2005" send XHTML_Add_Attribute "style" "width:300px;text-align:right;padding-right:10px" send XHTML_Close_Element // tr send XHTML_Close_Element // table end_procedure object oCustomerList is a WebPage set psPageName to "mypage" set phPageLayoutObject to (oDefaultPageLayout(self)) procedure OnWriteCell string lsLabel integer liAux if (lsLabel="topbar") begin // Nothings in the topbar end if (lsLabel="main") begin send XHTML_Add_Closed_Element "h1" "Hello Wide Wide Web World" end if (lsLabel="bottombar") begin send DoBottomBar end if (lsLabel="leftmenu") begin send DoLeftMenu end end_procedure end_object end_object // Web Module // Use waf.asp when generating links etc: set waf_config_value WACFG_ASP_FILE to "waf.asp" // The oWebPageBroker object is responsible for handling HTML requests and for the // module/page house keeping. object oWebPageBroker is a WebPageBroker set psHtmlLanguage to "en" // These values are all reflected in the section of the XHTML output: set psHtmlHeaderTitle to "WAF Demo" set psHtmlHeaderCopyrightCompany to "Good Fun Enterprises" set psHtmlHeaderCopyrightYear to "2005" set psHtmlHeaderGenerator to "Visual DataFlex WAF" set psDefaultModule to "mymodule" end_object