From: <rfl...@us...> - 2007-04-09 18:13:36
|
Revision: 280 http://svn.sourceforge.net/salto-db/?rev=280&view=rev Author: rflament Date: 2007-04-09 11:13:33 -0700 (Mon, 09 Apr 2007) Log Message: ----------- appfuse integration Modified Paths: -------------- salto-db-generator/trunk/src/appfuse.zip salto-db-generator/trunk/src/com/salto/db/generator/plugin/SpringWebappPlugin.java salto-db-generator/trunk/templates/hibernateejb3dao/abstracthibernatedao.vm salto-db-generator/trunk/templates/springhibernatedao/springabstracthibernatedao.vm salto-db-generator/trunk/templates/springwebapp/ApplicationResources.properties.vm salto-db-generator/trunk/templates/springwebapp/action-servlet.xml.vm salto-db-generator/trunk/templates/springwebapp/editor.vm salto-db-generator/trunk/templates/springwebapp/emlist.jsp.vm salto-db-generator/trunk/templates/springwebapp/form.jsp.vm salto-db-generator/trunk/templates/springwebapp/list.jsp.vm salto-db-generator/trunk/templates/springwebapp/menu.jsp.vm salto-db-generator/trunk/templates/springwebapp/searchform.jsp.vm Added Paths: ----------- salto-db-generator/trunk/templates/springwebapp/menu-config.xml.vm salto-db-generator/trunk/templates/springwebapp/menu2.jsp.vm Removed Paths: ------------- salto-db-generator/trunk/templates/springwebapp/index.jsp.vm Modified: salto-db-generator/trunk/src/appfuse.zip =================================================================== (Binary files differ) Modified: salto-db-generator/trunk/src/com/salto/db/generator/plugin/SpringWebappPlugin.java =================================================================== --- salto-db-generator/trunk/src/com/salto/db/generator/plugin/SpringWebappPlugin.java 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/src/com/salto/db/generator/plugin/SpringWebappPlugin.java 2007-04-09 18:13:33 UTC (rev 280) @@ -16,7 +16,7 @@ */ public class SpringWebappPlugin extends VelocityAbstractPlugin { - private SpringEJB3AndHibernateDAOAndTestCasesPlugin plugin; + private SpringEJB3AndHibernateDAOPlugin plugin; public static final String TEMPLATE_PATH = "springwebapp"; @@ -54,7 +54,7 @@ } public void postExecute(JdoInfo[] infos) throws Exception { - // plugin.srcPath += "/../webapp/WEB-INF/"; + plugin.postExecute(infos); CreatorUtil.getDoNameCreator().setPrefix(doPrefix); @@ -73,8 +73,9 @@ runVelocity(TEMPLATE_PATH, "action-servlet.xml.vm", srcPath + "/WebContent/WEB-INF/", "action-servlet.xml", context); runVelocity(TEMPLATE_PATH, "web.xml.vm", srcPath + "/WebContent/WEB-INF/", "web.xml", context); runVelocity(TEMPLATE_PATH, "ApplicationResources.properties.vm", srcPath + "/src/", "ApplicationResources.properties", context); - runVelocity(TEMPLATE_PATH, "index.jsp.vm", srcPath + "/WebContent/", "index.jsp", context); - runVelocity(TEMPLATE_PATH, "menu.jsp.vm", srcPath + "/WebContent/WEB-INF/pages", "menu.jsp", context); + runVelocity(TEMPLATE_PATH, "menu.jsp.vm", srcPath + "/WebContent/common", "menu.jsp", context); + runVelocity(TEMPLATE_PATH, "menu2.jsp.vm", srcPath + "/WebContent/WEB-INF/pages", "menu.jsp", context); + runVelocity(TEMPLATE_PATH, "menu-config.xml.vm", srcPath + "/WebContent/WEB-INF/", "menu-config.xml", context); runVelocity(TEMPLATE_PATH, "log4j.properties.vm", srcPath + "/src/", "log4j.properties", context); // unzip appfuse.zip @@ -96,7 +97,7 @@ public void init(String doPrefix, int defaultNameOffset, String srcPath, String pckName) throws Exception { super.init(doPrefix, defaultNameOffset, srcPath, pckName); - plugin = new SpringEJB3AndHibernateDAOAndTestCasesPlugin(); + plugin = new SpringEJB3AndHibernateDAOPlugin(); plugin.init(doPrefix, defaultNameOffset, srcPath + "/src", pckName); } Modified: salto-db-generator/trunk/templates/hibernateejb3dao/abstracthibernatedao.vm =================================================================== --- salto-db-generator/trunk/templates/hibernateejb3dao/abstracthibernatedao.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/hibernateejb3dao/abstracthibernatedao.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -138,7 +138,7 @@ @SuppressWarnings("unchecked") public List<T> findByExample(T exampleInstance, String[] excludeProperty) { Criteria crit = getSession().createCriteria(getPersistentClass()); - Example example = Example.create(exampleInstance); + Example example = Example.create(exampleInstance).excludeZeroes().enableLike().ignoreCase(); for (String exclude : excludeProperty) { example.excludeProperty(exclude); } Modified: salto-db-generator/trunk/templates/springhibernatedao/springabstracthibernatedao.vm =================================================================== --- salto-db-generator/trunk/templates/springhibernatedao/springabstracthibernatedao.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springhibernatedao/springabstracthibernatedao.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -127,7 +127,7 @@ @SuppressWarnings("unchecked") public List<T> findByExample(T exampleInstance, String[] excludeProperty) { Criteria crit = getSession().createCriteria(getPersistentClass()); - Example example = Example.create(exampleInstance); + Example example = Example.create(exampleInstance).excludeZeroes().enableLike().ignoreCase(); for (String exclude : excludeProperty) { example.excludeProperty(exclude); } Modified: salto-db-generator/trunk/templates/springwebapp/ApplicationResources.properties.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/ApplicationResources.properties.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/ApplicationResources.properties.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -1,5 +1,206 @@ # This file has been generated by ${generatorVersion} at $date #foreach($jdoInfo in ${jdoInfos}) -${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title=List of ${jdoInfo.javaClassName}s -#end \ No newline at end of file +${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title=List of ${jdoInfo.javaClassName}s +menu.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}.title=${jdoInfo.javaClassName} +menu.search.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title=Search for ${jdoInfo.javaClassName}s +#end + +menu.search.title=Search +menu.add.title=Add + +# The block of messages below are only found in this file. If you'd +# like to override them for other languages, simply add the keys +# to the other resource bundles. +webapp.name=Salto-db Generator (based on AppFuse) +webapp.tagline=Generated by Salto-db Generator v1.0.16 +webapp.version=Version 2.0-m4 +company.name=AppFuse +company.url=http://raibledesigns.com +copyright.year=2003-2007 + +user.status=Logged in as: +user.logout=Logout + +# -- validator errors -- +errors.invalid={0} is invalid. +errors.maxlength={0} can not be greater than {1} characters. +errors.minlength={0} can not be less than {1} characters. +errors.range={0} is not in the range {1} through {2}. +errors.required={0} is a required field. +errors.byte={0} must be an byte. +errors.date={0} is not a date. +errors.double={0} must be an double. +errors.float={0} must be an float. +errors.integer={0} must be a number. +errors.long={0} must be an long. +errors.short={0} must be an short. +errors.creditcard={0} is not a valid credit card number. +errors.email={0} is an invalid e-mail address. +errors.phone={0} is an invalid phone number. +errors.zip={0} is an invalid zip code. + +# -- other errors -- +errors.cancel=Operation cancelled. +errors.detail={0} +errors.general=<strong>The process did not complete. Details should follow.</strong> +errors.token=Request could not be completed. Operation is not in sequence. +errors.none=No error message was found, check your server logs. +errors.password.mismatch=Invalid username and/or password, please try again. +errors.conversion=An error occurred while converting web values to data values. +errors.twofields=The {0} field has to have the same value as the {1} field. +errors.existing.user=This username ({0}) or e-mail address ({1}) already exists. Please try a different username. + +# -- success messages -- +user.added=User information for <strong>{0}</strong> has been added successfully. +user.deleted=User Profile for <strong>{0}</strong> has been deleted successfully. +user.registered=You have successfully registered for access to this application. +user.saved=Your profile has been updated successfully. +user.updated.byAdmin=User information for <strong>{0}</strong> has been successfully updated. +newuser.email.message={0} has created an AppFuse account for you. Your username and password information is below. +reload.succeeded=Reloading options completed successfully. + +# -- error page messages -- +errorPage.title=An error has occurred +errorPage.heading=Yikes! +404.title=Page Not Found +404.message=The page your requested was not found. You might try returning to the <a href="{0}">Main Menu</a>. While you're here, how about a pretty picture to cheer you up? +403.title=Access Denied +403.message=Your current role does not allow you to view this page. Please contact your system administrator if you believe you should have access. In the meantime, how about a pretty picture to cheer you up? + +# -- login -- +login.title=Login +login.heading=Login +login.rememberMe=Remember Me +login.signup=Not a member? <a href="{0}">Signup</a> for an account. +login.passwordHint=Forgot your password? Have your <a href="?" onmouseover="window.status='Have your password hint sent to you.'; return true" onmouseout="window.status=''; return true" title="Have your password hint sent to you." onclick="passwordHint(); return false">password hint e-mailed to you</a>. +login.passwordHint.sent=The password hint for <strong>{0}</strong> has been sent to <strong>{1}</strong>. +login.passwordHint.error=The username <strong>{0}</strong> was not found in our database. + +# -- mainMenu -- +mainMenu.title=Main Menu +mainMenu.heading=Welcome! +mainMenu.message=Congratulations, you have logged in successfully! Now that you've logged in, you have the following options: +mainMenu.activeUsers=Current Users + +# -- menu/link messages -- +menu.admin=Administration +menu.admin.users=View Users +menu.admin.reload=Reload Options + +menu.user=Edit Profile +menu.selectFile=Upload A File +menu.flushCache=Flush Cache +menu.clickstream=Clickstream + +# -- form labels -- +label.username=Username +label.password=Password + +# -- button labels -- +button.add=Add +button.cancel=Cancel +button.copy=Copy +button.delete=Delete +button.done=Done +button.edit=Edit +button.register=Signup +button.save=Save +button.search=Search +button.upload=Upload +button.view=View +button.reset=Reset +button.login=Login + +# -- general values -- +icon.information=Information +icon.information.img=/images/iconInformation.gif +icon.email=E-Mail +icon.email.img=/images/iconEmail.gif +icon.warning=Warning +icon.warning.img=/images/iconWarning.gif +date.format=MM/dd/yyyy + +# -- role form -- +roleForm.name=Name + +# -- user profile page -- +userProfile.title=User Settings +userProfile.heading=User Profile +userProfile.message=Please update your information using the form below. +userProfile.admin.message=You can update this user's information using the form below. +userProfile.showMore=View More Information +userProfile.accountSettings=Account Settings +userProfile.assignRoles=Assign Roles +userProfile.cookieLogin=You cannot change passwords when logging in with the <strong>Remember Me</strong> feature. Please logout and log back in to change passwords. + +# -- user form -- +user.address.address=Address +user.availableRoles=Available Roles +user.address.city=City +user.address.country=Country +user.email=E-Mail +user.firstName=First Name +user.id=Id +user.lastName=Last Name +user.password=Password +user.confirmPassword=Confirm Password +user.phoneNumber=Phone Number +user.address.postalCode=Zip +user.address.province=State +user.roles=Current Roles +user.username=Username +user.website=Website +user.visitWebsite=visit +user.passwordHint=Password Hint +user.enabled=Enabled +user.accountExpired=Expired +user.accountLocked=Locked +user.credentialsExpired=Password Expired + +# -- user list page -- +userList.title=User List +userList.heading=Current Users +userList.nousers=<span>No users found.</span> + +# -- user self-registration -- +signup.title=Sign Up +signup.heading=New User Registration +signup.message=Please enter your user information in the form below. +signup.email.subject=AppFuse Account Information +signup.email.message=You have successfully registered for access to AppFuse. Your username and password information is below. + +# -- upload page messages -- +maxLengthExceeded=The file you are trying to upload is too big. The maximum allowed size is 2 MB. +upload.title=File Upload +upload.heading=Upload A File +upload.message=Note that the maximum allowed size of an uploaded file for this application is 2 MB. +uploadForm.name=Friendly Name +uploadForm.file=File to Upload + +# -- display page messages -- +display.title=File Uploaded Successfully! +display.heading=File Information + +# -- flushCache page -- +flushCache.title=Flush Cache +flushCache.heading=Flush Successful! +flushCache.message=All caches successfully flushed, returning you to your previous page in 2 seconds. + +# -- clickstreams page -- +clickstreams.title=All Clickstreams +clickstreams.heading=All Clickstreams + +# -- viewstream page -- +viewstream.title=Stream Details +viewstream.heading=Stream Information + +# -- active users page -- +activeUsers.title=Active Users +activeUsers.heading=Current Users +activeUsers.message=The following is a list of users that have logged in and their sessions have not expired. +activeUsers.fullName=Full Name + +# JSF-only messages, remove if not using JSF +javax.faces.component.UIInput.REQUIRED=This is a required field. +activeUsers.summary={0} User(s) found, displaying {1} user(s), from {2} to {3}. Page {4} / {5} \ No newline at end of file Modified: salto-db-generator/trunk/templates/springwebapp/action-servlet.xml.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/action-servlet.xml.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/action-servlet.xml.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -15,7 +15,8 @@ </property> </bean> - + <bean id="filenameController" class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/> + <!-- List controllers --> #foreach($jdoInfo in ${jdoInfos}) <bean id="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}ListController" class="${pckName}.webapp.controller.${jdoInfo.javaClassName}ListController"> @@ -81,7 +82,8 @@ <prop key="/list${jdoInfo.javaClassName}.html">${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}ListController</prop> #end #foreach($jdoInfo in ${jdoInfos}) - <prop key="/addupdate${jdoInfo.javaClassName}.html">${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}AddUpdateController</prop> + <prop key="/addupdate${jdoInfo.javaClassName}.html">${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}AddUpdateController</prop> + <prop key="/add${jdoInfo.javaClassName}.html">${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}AddUpdateController</prop> #end #foreach($jdoInfo in ${jdoInfos}) <prop key="/delete${jdoInfo.javaClassName}.html">${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}AjaxDeleteController</prop> @@ -89,6 +91,7 @@ #foreach($jdoInfo in ${jdoInfos}) <prop key="/search${jdoInfo.javaClassName}.html">${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}SearchController</prop> #end + <prop key="/mainMenu.html">filenameController</prop> </props> </property> </bean> Modified: salto-db-generator/trunk/templates/springwebapp/editor.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/editor.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/editor.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -8,6 +8,21 @@ #set ($pkEntry="${pk.javaAttName}") #end #end +#set ($pk="Long") +#set ($pkname="") +#foreach($col in ${jdoInfo.jdoColInfos}) +#foreach($colpk in ${jdoInfo.getPk()}) +#if ($colpk.col.equals($col.colName)) +#set ($pk=$util.getClassNameForPrimitive($col.javaAttClass)) +#set ($pkname=$util.getDoNameCreator().attribute2class($col.javaAttName)) +#end +#end +#end +#if ($util.getLength($jdoInfo.getPk()) > 1) +#set ($pk="${jdoInfo.javaClassName}PK") +#set ($pkname="${jdoInfo.javaClassName}PK") +import ${jdoInfo.javaPckName}.pojo.${jdoInfo.javaClassName}.${jdoInfo.javaClassName}PK; +#end /** * <p>PropertyEditorSupport for ${jdoInfo.javaClassName}s</p> @@ -17,10 +32,24 @@ */ public class ${jdoInfo.javaClassName}EditorSupport extends PropertyEditorSupport { + private ${pk} getPkFromString(String text) { +#if ($util.getLength($jdoInfo.getPk()) > 1) + //TODO : get composite of the pk in request and return an instance of ${pk} + return null; +#else +#if ($pk == "Integer") + return Integer.parseInt(text); +#end +#if ($pk == "Long") + return Long.parseLong(text); +#end +#end + } + public void setAsText(String text) throws IllegalArgumentException { ${jdoInfo.javaClassName} ${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})} = new ${jdoInfo.javaClassName}(); - ${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}.set${util.DoNameCreator.attribute2class(${pkEntry})}(Long.valueOf(text)); + ${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}.set${util.DoNameCreator.attribute2class(${pkEntry})}(getPkFromString(text)); setValue(${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}); } Modified: salto-db-generator/trunk/templates/springwebapp/emlist.jsp.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/emlist.jsp.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/emlist.jsp.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -1,26 +1,14 @@ #if ($util.getLength($jdoInfo.pk) > 0) #foreach($pk in $jdoInfo.pk) -#set ($pkEntry="entry.${pk.javaAttName}") +#set ($pkEntry="${pk.javaAttName}") #end #end <c:if test="${ not empty ${jdoInfo.javaClassName}list}"> - <table> - <tr> +<display:table name="${jdoInfo.javaClassName}list" cellspacing="0" cellpadding="0" requestURI="" + defaultsort="1" id="${jdoInfo.javaClassName}" pagesize="25" class="table" export="true"> #foreach($col in ${jdoInfo.nonFKColInfos}) - <th>${col.javaAttName}</th> -#end - <th>Remove</th> - </tr> -<c:forEach items="${${jdoInfo.javaClassName}list}" var="entry"> - <tr> -#foreach($col in ${jdoInfo.nonFKColInfos}) -#set ($val = "entry.${col.javaAttName}") - <td><a href="addupdate${jdoInfo.javaClassName}.html?${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}Id=<c:out value="${${pkEntry}}" />"><c:out value="${${val}}" /></a></td> -#end - <td> - <a href="#" onclick="remove${jdoInfo.javaClassName}(<c:out value="${${pkEntry}})"/>">X</a> - </td> - </tr> -</c:forEach> - </table> + <display:column property="${col.javaAttName}" escapeXml="true" sortable="true" title="${col.javaAttName}" url="/addupdate${jdoInfo.javaClassName}.html" paramId="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}Id" paramProperty="${pkEntry}"/> +#end + +</display:table> </c:if> \ No newline at end of file Modified: salto-db-generator/trunk/templates/springwebapp/form.jsp.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/form.jsp.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/form.jsp.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -1,29 +1,23 @@ -<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %> -<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> -<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<%@ include file="/common/taglibs.jsp"%> #if ($util.getLength($jdoInfo.pk) > 0) #foreach($pk in $jdoInfo.pk) #set ($pkEntry="${pk.javaAttName}") #end #end <head> + <title><fmt:message key="menu.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}.title"/></title> + <content tag="heading"><fmt:message key="menu.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}.title"/></content> + <meta name="menu" content="${jdoInfo.javaClassName}"/> </head> - <body> -<%@ include file="menu.jsp" %> +<fieldset> <form:form commandName="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}" action="addupdate${jdoInfo.javaClassName}.html" method="post"> <ul> #foreach($col in ${jdoInfo.nonFKColInfos}) - <li><label for="${col.javaAttName}">${col.javaAttName}</label><form:errors path="${col.javaAttName}" /><span><form:input path="${col.javaAttName}" id="${col.javaAttName}"/></span></li> + <li><label class="desc" for="${col.javaAttName}">${col.javaAttName}</label><form:errors path="${col.javaAttName}" /><span><form:input cssClass="text medium" path="${col.javaAttName}" id="${col.javaAttName}"/></span></li> #end #foreach($colfk in ${jdoInfo.getImportedFk()}) #foreach($colfk2 in $colfk) - <li><label for="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}">${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}</label> + <li><label class="desc" for="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}">${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}</label> <form:errors path="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}" /> <span> <form:select path="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}" id="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}"> @@ -35,12 +29,11 @@ #end #end <c:if test="${ empty requestScope['${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}'].$pkEntry}"> - <li><input type="submit" name="add" value="Add" /> <input type="submit" name="cancel" value="Cancel" /></li> + <li><input type="submit" class="button" name="add" value="Add" /> <input class="button" type="submit" name="cancel" value="Cancel" /></li> </c:if> <c:if test="${ not empty requestScope['${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}'].$pkEntry}"> - <li><input type="submit" name="update" value="Update" /> <input type="submit" name="cancel" value="Cancel" /></li> + <li><input type="submit" class="button" name="update" value="Update" /> <input class="button" type="submit" name="cancel" value="Cancel" /></li> </c:if> </ul> </form:form> - </body> -</html> \ No newline at end of file +</fieldset> \ No newline at end of file Deleted: salto-db-generator/trunk/templates/springwebapp/index.jsp.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/index.jsp.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/index.jsp.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -1,16 +0,0 @@ -<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %> -<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> -<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - </head> - <body> - This webapp has been generated by ${generatorVersion} at $date. -<%@ include file="/WEB-INF/pages/menu.jsp" %> - </body> -</html> \ No newline at end of file Modified: salto-db-generator/trunk/templates/springwebapp/list.jsp.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/list.jsp.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/list.jsp.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -1,15 +1,8 @@ -<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %> -<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> -<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<%@ include file="/common/taglibs.jsp"%> <head> <title><fmt:message key="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title"/></title> - </head> + <content tag="heading"><fmt:message key="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title"/></content> + <script language="javascript"> function remove${jdoInfo.javaClassName}(id) @@ -19,9 +12,5 @@ } </script> - <body> -<%@ include file="menu.jsp" %> - <h1>List of ${jdoInfo.javaClassName}s</h1> -<%@ include file="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}EmList.jsp" %> - </body> -</html> \ No newline at end of file + </head> +<%@ include file="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}EmList.jsp" %> \ No newline at end of file Added: salto-db-generator/trunk/templates/springwebapp/menu-config.xml.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/menu-config.xml.vm (rev 0) +++ salto-db-generator/trunk/templates/springwebapp/menu-config.xml.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<MenuConfig> + <Displayers> + <Displayer name="Velocity" type="net.sf.navigator.displayer.VelocityMenuDisplayer"/> + </Displayers> + <Menus> + +#foreach($jdoInfo in ${jdoInfos}) + <Menu name="${jdoInfo.javaClassName}" title="menu.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}.title"> + <Item name="${jdoInfo.javaClassName}List" title="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title" page="/list${jdoInfo.javaClassName}.html"/> + <Item name="${jdoInfo.javaClassName}Search" title="menu.search.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title" page="/search${jdoInfo.javaClassName}.html"/> + <Item name="${jdoInfo.javaClassName}Add" title="menu.add.title" page="/add${jdoInfo.javaClassName}.html"/> + </Menu> + +#end + </Menus> +</MenuConfig> \ No newline at end of file Modified: salto-db-generator/trunk/templates/springwebapp/menu.jsp.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/menu.jsp.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/menu.jsp.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -1,9 +1,10 @@ -<div id="menu"> - <ul> +<%@ include file="/common/taglibs.jsp"%> + +<menu:useMenuDisplayer name="Velocity" config="WEB-INF/classes/cssHorizontalMenu.vm"> +<ul id="primary-nav" class="menuList"> + <li class="pad"> </li> #foreach($jdoInfo in ${jdoInfos}) - <li><a href="addupdate${jdoInfo.javaClassName}.html">Add a ${jdoInfo.javaClassName}</a></li> - <li><a href="list${jdoInfo.javaClassName}.html">List ${jdoInfo.javaClassName}s</a></li> - <li><a href="search${jdoInfo.javaClassName}.html">Search ${jdoInfo.javaClassName}s</a></li> -#end - </ul> -</div> \ No newline at end of file + <menu:displayMenu name="${jdoInfo.javaClassName}"/> +#end +</ul> +</menu:useMenuDisplayer> \ No newline at end of file Added: salto-db-generator/trunk/templates/springwebapp/menu2.jsp.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/menu2.jsp.vm (rev 0) +++ salto-db-generator/trunk/templates/springwebapp/menu2.jsp.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -0,0 +1,23 @@ +<%@ include file="/common/taglibs.jsp"%> + +<menu:useMenuDisplayer name="Velocity" config="WEB-INF/classes/cssHorizontalMenu.vm"> +<ul id="primary-nav" class="menuList"> + <li class="pad"> </li> +#foreach($jdoInfo in ${jdoInfos}) + <menu:displayMenu name="${jdoInfo.javaClassName}"/> +#end +</ul> +</menu:useMenuDisplayer> + +<script type="text/javascript"> +/*<![CDATA[*/ +var navItems = document.getElementById("primary-nav").getElementsByTagName("li"); + +for (var i=0; i<navItems.length; i++) { + if(navItems[i].className == "menubar") { + navItems[i].onmouseover=function() { this.className += " over"; } + navItems[i].onmouseout=function() { this.className = "menubar"; } + } +} +/*]]>*/ +</script> \ No newline at end of file Modified: salto-db-generator/trunk/templates/springwebapp/searchform.jsp.vm =================================================================== --- salto-db-generator/trunk/templates/springwebapp/searchform.jsp.vm 2007-04-06 14:28:11 UTC (rev 279) +++ salto-db-generator/trunk/templates/springwebapp/searchform.jsp.vm 2007-04-09 18:13:33 UTC (rev 280) @@ -1,30 +1,24 @@ -<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %> -<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %> -<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> -<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> -<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> -<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<%@ include file="/common/taglibs.jsp"%> #if ($util.getLength($jdoInfo.pk) > 0) #foreach($pk in $jdoInfo.pk) #set ($pkEntry="${pk.javaAttName}") #end #end <head> + <title><fmt:message key="menu.search.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title"/></title> + <content tag="heading"><fmt:message key="menu.search.${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}List.title"/></content> + <meta name="menu" content="${jdoInfo.javaClassName}"/> </head> - <body> -<%@ include file="menu.jsp" %> - <h1>Search ${jdoInfo.javaClassName}s</h1> + +<fieldset> <form:form commandName="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}" action="search${jdoInfo.javaClassName}.html" method="post"> <ul> #foreach($col in ${jdoInfo.nonFKColInfos}) - <li><label for="${col.javaAttName}">${col.javaAttName}</label><form:errors path="${col.javaAttName}" /><span><form:input path="${col.javaAttName}" id="${col.javaAttName}"/></span></li> + <li><label class="desc" for="${col.javaAttName}">${col.javaAttName}</label><form:errors path="${col.javaAttName}" /><span><form:input cssClass="text medium" path="${col.javaAttName}" id="${col.javaAttName}"/></span></li> #end #foreach($colfk in ${jdoInfo.getImportedFk()}) #foreach($colfk2 in $colfk) - <li><label for="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}">${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}</label> + <li><label class="desc" for="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}">${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}</label> <form:errors path="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}" /> <span> <form:select path="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}" id="${util.DoNameCreator.class2attribute(${colfk2.pkJavaClassName})}"> @@ -35,9 +29,8 @@ </li> #end #end - <li id="buttons"><input type="submit" name="search" value="Search" /></li> + <li id="buttons"><input class="button" type="submit" name="search" value="Search" /></li> </ul> </form:form> -<%@ include file="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}EmList.jsp" %> - </body> -</html> \ No newline at end of file +</fieldset> +<%@ include file="${util.DoNameCreator.class2attribute(${jdoInfo.javaClassName})}EmList.jsp" %> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |