From: <sim...@us...> - 2007-05-13 21:51:31
|
Revision: 286 http://svn.sourceforge.net/zkforge/?rev=286&view=rev Author: simon_massey Date: 2007-05-13 14:51:26 -0700 (Sun, 13 May 2007) Log Message: ----------- Removed Paths: ------------- trunk/foodToGo/src/main/webapp/load-bulk-test-data.zul trunk/foodToGo/src/main/webapp/menu-items-popup.zul trunk/foodToGo/src/main/webapp/menu-items.zul trunk/foodToGo/src/main/webapp/restaurant-details.zul trunk/foodToGo/src/main/webapp/restaurant-list.zul Deleted: trunk/foodToGo/src/main/webapp/load-bulk-test-data.zul =================================================================== --- trunk/foodToGo/src/main/webapp/load-bulk-test-data.zul 2007-05-13 21:47:09 UTC (rev 285) +++ trunk/foodToGo/src/main/webapp/load-bulk-test-data.zul 2007-05-13 21:51:26 UTC (rev 286) @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="windows-1251"?> -<!-- -ZK Food To Go :: A realistic example of using ZK with POJOs, Spring and Hibernate. -Copyright (C) 2006 Simon Massey - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ---> -<window title="Load Bulk Test Data" border="normal"> - <zscript> - // It is not recommended that you do this within a ZScript instead subclass Window and do this - // in the onCreate @see org.zkforge.ftg.FoodToGoController - - import org.springframework.beans.factory.BeanFactory; - import org.springframework.web.context.support.WebApplicationContextUtils; - import javax.servlet.ServletContext; - - WebApp webApp = desktop.getWebApp(); - ServletContext servletContext = (ServletContext)webApp.getNativeContext(); - BeanFactory beanFactory = (BeanFactory)WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); - - RestaurantRepository restaurantRepository = (RestaurantRepository)beanFactory.getBean("RestaurantRepositoryImpl"); - - </zscript> - <vbox> - Number Of Restaurants: <intbox id="nRestaurants"/> - Number Of Menu Items Per Restaurant: <intbox id="nMenuItems"/> - <button label="Do Load"> - <attribute name="onClick">{ - alert(nRestaurant.value+" x "+nMenuItems.value); - }</attribute> - </button> - </vbox> -</window> \ No newline at end of file Deleted: trunk/foodToGo/src/main/webapp/menu-items-popup.zul =================================================================== --- trunk/foodToGo/src/main/webapp/menu-items-popup.zul 2007-05-13 21:47:09 UTC (rev 285) +++ trunk/foodToGo/src/main/webapp/menu-items-popup.zul 2007-05-13 21:51:26 UTC (rev 286) @@ -1,28 +0,0 @@ -<!-- -ZK Food To Go :: A realistic example of using ZK with POJOs, Spring and Hibernate. -Copyright (C) 2006 Simon Massey - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ---> -<window id="win" title="Add Menu Item" border="normal" width="200px" closable="true"> -<zscript> -doAdd(String name, java.math.BigDecimal price){ - rows = Path.getComponent("//menu-items/main/MenuItemRows"); - rows.addMenuItem(name, price); -} -</zscript> - <vbox>Name:<textbox id="name" value=""/> Price:<decimalbox id="price" format="#,##0.##"/></vbox> - <button label="Add" onClick="doAdd(name.value,price.value);win.detach()"/> <button label="Cancel" onClick="win.detach()"/> -</window> \ No newline at end of file Deleted: trunk/foodToGo/src/main/webapp/menu-items.zul =================================================================== --- trunk/foodToGo/src/main/webapp/menu-items.zul 2007-05-13 21:47:09 UTC (rev 285) +++ trunk/foodToGo/src/main/webapp/menu-items.zul 2007-05-13 21:51:26 UTC (rev 286) @@ -1,45 +0,0 @@ -<?page id="menu-items"?> -<!-- -ZK Food To Go :: A realistic example of using ZK with POJOs, Spring and Hibernate. -Copyright (C) 2006 Simon Massey - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ---> -<window id="main"> -<zscript> - foodToGoDelegate = Path.getComponent("//main-page/FoodToGoController/"); - restaurant = foodToGoDelegate.getRestaurant(); - List menuItems = null; - if( null != restaurant ) { - menuItems = restaurant.getMenuItems(); - } - if( null == menuItems ) { - menuItems = new ArrayList(); - } -</zscript> - -<groupbox width="500px"> - <caption label="Menu Items"/> - <grid> - <columns> - <!-- TODO Impliment the sort --> - <column label="Item Name" sortAscending="${asc}" sortDescending="${dsc}"/> - <column label="Item Price"/> - </columns> - <rows id="MenuItemRows" use="org.zkforge.ftg.ExpandingMenuItemRows"/> - </grid> -</groupbox> - -</window> \ No newline at end of file Deleted: trunk/foodToGo/src/main/webapp/restaurant-details.zul =================================================================== --- trunk/foodToGo/src/main/webapp/restaurant-details.zul 2007-05-13 21:47:09 UTC (rev 285) +++ trunk/foodToGo/src/main/webapp/restaurant-details.zul 2007-05-13 21:51:26 UTC (rev 286) @@ -1,67 +0,0 @@ -<?page id="restaurant-details"?> -<!-- -ZK Food To Go :: A realistic example of using ZK with POJOs, Spring and Hibernate. -Copyright (C) 2006 Simon Massey - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ---> -<window id="main"> - <zscript> - foodToGoDelegate = Path.getComponent("//main-page/FoodToGoController/"); - restaurant = foodToGoDelegate.getRestaurant(); - name = (null != restaurant)?restaurant.name:""; - type = (null != restaurant)?restaurant.type:""; - boolean isType(item){ - return type.equals("item"); - } - </zscript> - <label id="ErrorMessage" style="color: red; font-weight: bold" value=""/> - - -<groupbox width="500px"> - <caption label="Restaurant Details"/> - <grid> - <rows> - <row> - <label id="RestaurantNameLabel" value="Restaurant Name:"/> <textbox id="namebox" value="${name}"/> - </row> - <row> - <label id="RestaurantTypeLabel" value="Restaurant Type:"/> - <hbox> - <!-- TODO: This dropdown should be data source bound to the server. It should also cache most likely in the hibernate cache. --> - <listbox id="typeselect" mold="select" rows="1"> - <listitem label="--- Please Select ---" value="NULL"/> - <listitem label="Pizza" value="Pizza"> - <attribute name="selected">${restaurant.type == "Pizza"}</attribute> - </listitem> - <listitem label="Chinese" value="Chinese"> - <attribute name="selected">${restaurant.type == "Chinese"}</attribute> - </listitem> - <listitem label="Indian" value="Indian"> - <attribute name="selected">${restaurant.type == "Indian"}</attribute> - </listitem> - <listitem label="Mexican" value="Mexican"> - <attribute name="selected">${restaurant.type == "Mexican"}</attribute> - </listitem> - <listitem label="Thai" value="Thai"> - <attribute name="selected">${restaurant.type == "Thai"}</attribute> - </listitem> - </listbox> - </hbox> - </row> - </rows> - </grid> -</groupbox> -</window> \ No newline at end of file Deleted: trunk/foodToGo/src/main/webapp/restaurant-list.zul =================================================================== --- trunk/foodToGo/src/main/webapp/restaurant-list.zul 2007-05-13 21:47:09 UTC (rev 285) +++ trunk/foodToGo/src/main/webapp/restaurant-list.zul 2007-05-13 21:51:26 UTC (rev 286) @@ -1,48 +0,0 @@ -<!-- -ZK Food To Go :: A realistic example of using ZK with POJOs, Spring and Hibernate. -Copyright (C) 2006 Simon Massey - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ---> -<window> - <zscript> - foodToGoDelegate = Path.getComponent("//main-page/FoodToGoController/"); - List items = foodToGoDelegate.getRestaurants(); - </zscript> - -<groupbox width="300px"> - <caption label="Restaurants In The Database"/> - <listbox mold="paging" id="restaurant-list"> - <listitem forEach="${items}"> - <attribute name="onClick"> - <![CDATA[ - foodToGoDelegate.restaurantSelected(componentScope.get("id")); - details = Path.getComponent("//main-page/FoodToGoController/details"); - String tmp=details.src; details.src=null; details.src=tmp; - - menuItems = Path.getComponent("//main-page/FoodToGoController/menu-items"); - String tmp=menuItems.src; menuItems.src=null; menuItems.src=tmp; - - ]]> - </attribute> - <custom-attributes id="${each.id}"/> - <listcell label="${each.id}"/> - <listcell label="${each.name}"/> - <listcell label="${each.type}"/> - </listitem> - </listbox> -</groupbox> - -</window> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |