Seam SVN: r9264 - in trunk/seam-gen: view and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-12 01:26:44 -0400 (Sun, 12 Oct 2008)
New Revision: 9264
Modified:
trunk/seam-gen/util/TypeInfo.ftl
trunk/seam-gen/view/action.xhtml
trunk/seam-gen/view/conversation.xhtml
trunk/seam-gen/view/edit.xhtml
trunk/seam-gen/view/edit.xhtml.ftl
trunk/seam-gen/view/error.xhtml
trunk/seam-gen/view/form.xhtml
trunk/seam-gen/view/home.xhtml
trunk/seam-gen/view/list.xhtml
trunk/seam-gen/view/list.xhtml.ftl
trunk/seam-gen/view/login.xhtml
trunk/seam-gen/view/page.xhtml
trunk/seam-gen/view/query.xhtml
trunk/seam-gen/view/view.xhtml.ftl
trunk/seam-gen/view/viewproperty.xhtml.ftl
Log:
use proper converter whenever outputting a value
some whitespace formatting
Modified: trunk/seam-gen/util/TypeInfo.ftl
===================================================================
(Binary files differ)
Modified: trunk/seam-gen/view/action.xhtml
===================================================================
--- trunk/seam-gen/view/action.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/action.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,13 +1,13 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:a="http://richfaces.org/a4j"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -26,4 +26,3 @@
</ui:define>
</ui:composition>
-
Modified: trunk/seam-gen/view/conversation.xhtml
===================================================================
--- trunk/seam-gen/view/conversation.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/conversation.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,12 +1,12 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -38,4 +38,3 @@
</ui:define>
</ui:composition>
-
Modified: trunk/seam-gen/view/edit.xhtml
===================================================================
--- trunk/seam-gen/view/edit.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/edit.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,12 +1,12 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -50,4 +50,3 @@
</ui:define>
</ui:composition>
-
Modified: trunk/seam-gen/view/edit.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/edit.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/edit.xhtml.ftl 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,19 +1,18 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<#assign entityName = pojo.shortName>
<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign pageName = entityName>
-
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:a="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -91,7 +90,7 @@
<h:outputText value="There is no ${property.name} associated with this ${componentName}."
rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
- <rich:dataTable var="${parentName}"
+ <rich:dataTable var="_${parentName}"
value="${'#'}{${homeName}.instance.${property.name}}"
rendered="${'#'}{${homeName}.instance.${property.name} != null}"
rowClasses="rvgRowOne,rvgRowTwo"
@@ -102,13 +101,13 @@
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
<f:facet name="header">${label(componentProperty.name)}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
+ <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${componentProperty.name}}" indent=16/>
</h:column>
</#foreach>
<#else>
<h:column>
<f:facet name="header">${label(parentProperty.name)}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}}
+ <@outputValue property=parentProperty expression="${'#'}{_${parentName}.${parentProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
@@ -117,14 +116,14 @@
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
+ <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
+ <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}" indent=16/>
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
+ <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
+ <@outputValue property=parentParentPojo.indentifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
@@ -138,11 +137,11 @@
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
<f:param name="${parentName}${componentProperty.name?cap_first}"
- value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
+ value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
<f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}"
- value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
+ value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}}"/>
</#if>
</s:link>
</h:column>
@@ -163,7 +162,7 @@
<#if c2h.isOneToManyCollection(property)>
<rich:tab label="${label(property.name)}">
- <div class="association" id="${property.name}Children">
+ <h:form styleClass="association" id="${property.name}Children">
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
@@ -173,7 +172,7 @@
rendered="${'#'}{empty ${homeName}.${property.name}}"/>
<rich:dataTable value="${'#'}{${homeName}.${property.name}}"
- var="${childName}"
+ var="_${childName}"
rendered="${'#'}{not empty ${homeName}.${property.name}}"
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
@@ -181,16 +180,16 @@
<#if !c2h.isCollection(childProperty) && !isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
- <h:column>
+ <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}">
<f:facet name="header">${label(componentProperty.name)}</f:facet>
- ${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
- </h:column>
+ <@outputValue property=componentProperty expression="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}" indent=20/>
+ </rich:column>
</#foreach>
<#else>
- <h:column>
+ <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}}">
<f:facet name="header">${label(childProperty.name)}</f:facet>
- <h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
- </h:column>
+ <@outputValue property=childProperty expression="${'#'}{_${childName}.${childProperty.name}}" indent=20/>
+ </rich:column>
</#if>
</#if>
</#foreach>
@@ -203,18 +202,18 @@
<#if childPojo.isComponent(childPojo.identifierProperty)>
<#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
<f:param name="${childName}${componentProperty.name?cap_first}"
- value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
+ value="${'#'}{_${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
<f:param name="${childName}${childPojo.identifierProperty.name?cap_first}"
- value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
+ value="${'#'}{_${childName}.${childPojo.identifierProperty.name}}"/>
</#if>
<f:param name="${childName}From" value="${entityName}"/>
</s:link>
</h:column>
</rich:dataTable>
- </div>
+ </h:form>
<f:subview rendered="${'#'}{${homeName}.managed}" id="${property.name}">
<div class="actionButtons">
Modified: trunk/seam-gen/view/error.xhtml
===================================================================
--- trunk/seam-gen/view/error.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/error.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,19 +1,19 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
-<ui:param name="showGlobalMessages" value="false"/>
-<ui:define name="body">
+ <ui:param name="showGlobalMessages" value="false"/>
+ <ui:define name="body">
- <h1>Error</h1>
- <p>Something bad happened :-(</p>
+ <h1>Error</h1>
+ <p>Something bad happened :-(</p>
- <h:messages id="errorMessage" styleClass="message"/>
+ <h:messages id="errorMessage" styleClass="message"/>
-</ui:define>
+ </ui:define>
</ui:composition>
Modified: trunk/seam-gen/view/form.xhtml
===================================================================
--- trunk/seam-gen/view/form.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/form.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,13 +1,13 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:a="http://richfaces.org/a4j"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ template="layout/template.xhtml">
<ui:define name="body">
Modified: trunk/seam-gen/view/home.xhtml
===================================================================
--- trunk/seam-gen/view/home.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/home.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,32 +1,32 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
-<ui:define name="body">
+ <ui:define name="body">
- <rich:panel>
- <f:facet name="header">Welcome!</f:facet>
- <p>This empty shell application includes:</p>
- <ul>
- <li>Ant build script</li>
- <li>Deployment to JBoss AS (EAR or WAR)</li>
- <li>Development and production profiles</li>
- <li>Integration testing using TestNG and Embedded JBoss</li>
- <li>JavaBean or EJB 3.0 Seam components</li>
- <li>JPA entity classes</li>
- <li>A configurable DataSource and JPA EntityManager</li>
- <li>Templated Facelets views</li>
- <li>RichFaces panels and tables</li>
- <li>Default CSS stylesheet</li>
- <li>Internationalization support</li>
- </ul>
- </rich:panel>
+ <rich:panel>
+ <f:facet name="header">Welcome!</f:facet>
+ <p>This empty shell application includes:</p>
+ <ul>
+ <li>Ant build script</li>
+ <li>Deployment to JBoss AS (EAR or WAR)</li>
+ <li>Development and production profiles</li>
+ <li>Integration testing using TestNG and Embedded JBoss</li>
+ <li>JavaBean or EJB 3.0 Seam components</li>
+ <li>JPA entity classes</li>
+ <li>A configurable DataSource and JPA EntityManager</li>
+ <li>Templated Facelets views</li>
+ <li>RichFaces panels and tables</li>
+ <li>Default CSS stylesheet</li>
+ <li>Internationalization support</li>
+ </ul>
+ </rich:panel>
-</ui:define>
+ </ui:define>
</ui:composition>
Modified: trunk/seam-gen/view/list.xhtml
===================================================================
--- trunk/seam-gen/view/list.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/list.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,12 +1,12 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -49,4 +49,3 @@
</ui:define>
</ui:composition>
-
Modified: trunk/seam-gen/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/list.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/list.xhtml.ftl 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,6 +1,5 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
<#assign componentName = entityName?uncap_first>
@@ -8,14 +7,13 @@
<#assign pageName = entityName>
<#assign editPageName = entityName + "Edit">
<#assign listPageName = entityName + "List">
-
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -63,7 +61,7 @@
rendered="${'#'}{empty ${listName}.resultList}"/>
<rich:dataTable id="${listName}"
- var="${componentName}"
+ var="_${componentName}"
value="${'#'}{${listName}.resultList}"
rendered="${'#'}{not empty ${listName}.resultList}">
<#foreach property in pojo.allPropertiesIterator>
@@ -79,7 +77,7 @@
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
- ${'#'}{${componentName}.${property.name}.${componentProperty.name}}
+ <@outputValue property=componentProperty expression="${'#'}{_${componentName}.${property.name}.${componentProperty.name}}" indent=12/>
</h:column>
</#foreach>
<#else>
@@ -91,7 +89,7 @@
<ui:param name="propertyPath" value="${property.name}"/>
</ui:include>
</f:facet>
- ${'#'}{${componentName}.${property.name}}
+ <@outputValue property=property expression="${'#'}{_${componentName}.${property.name}}" indent=12/>
</h:column>
</#if>
</#if>
@@ -108,7 +106,7 @@
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
- ${'#'}{${componentName}.${propertyPath}}
+ <@outputValue property=componentProperty expression="${'#'}{_${componentName}.${propertyPath}}" indent=12/>
</h:column>
</#foreach>
<#else>
@@ -121,7 +119,7 @@
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
- ${'#'}{${componentName}.${propertyPath}}
+ <@outputValue property=parentPojo.identifierProperty expression="${'#'}{_${componentName}.${propertyPath}}" indent=12/>
</h:column>
</#if>
</#if>
@@ -134,11 +132,11 @@
<#if pojo.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
<f:param name="${componentName}${componentProperty.name?cap_first}"
- value="${'#'}{${componentName}.${pojo.identifierProperty.name}.${componentProperty.name}}"/>
+ value="${'#'}{_${componentName}.${pojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
<f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
- value="${'#'}{${componentName}.${pojo.identifierProperty.name}}"/>
+ value="${'#'}{_${componentName}.${pojo.identifierProperty.name}}"/>
</#if>
</s:link>
</h:column>
@@ -201,4 +199,3 @@
</ui:define>
</ui:composition>
-
Modified: trunk/seam-gen/view/login.xhtml
===================================================================
--- trunk/seam-gen/view/login.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/login.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,12 +1,12 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
<ui:define name="body">
Modified: trunk/seam-gen/view/page.xhtml
===================================================================
--- trunk/seam-gen/view/page.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/page.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,17 +1,16 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
-<ui:define name="body">
+ <ui:define name="body">
- <h1>${pageName}</h1>
- <p>Generated page.</p>
+ <h1>${pageName}</h1>
+ <p>Generated page.</p>
-</ui:define>
-
+ </ui:define>
</ui:composition>
Modified: trunk/seam-gen/view/query.xhtml
===================================================================
--- trunk/seam-gen/view/query.xhtml 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/query.xhtml 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,11 +1,11 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -64,4 +64,3 @@
</ui:define>
</ui:composition>
-
Modified: trunk/seam-gen/view/view.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/view.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/view.xhtml.ftl 2008-10-12 05:26:44 UTC (rev 9264)
@@ -1,19 +1,18 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign editPageName = entityName + "Edit">
-
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- template="layout/template.xhtml">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
<ui:define name="body">
@@ -62,7 +61,7 @@
<h:outputText value="There is no ${property.name} associated with this ${componentName}."
rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
- <rich:dataTable var="${parentName}"
+ <rich:dataTable var="_${parentName}"
value="${'#'}{${homeName}.instance.${property.name}}"
rendered="${'#'}{${homeName}.instance.${property.name} != null}"
rowClasses="rvgRowOne,rvgRowTwo"
@@ -73,13 +72,13 @@
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
<f:facet name="header">${label(componentProperty.name)}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
+ <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${componentProperty.name}}" indent=16/>
</h:column>
</#foreach>
<#else>
<h:column>
<f:facet name="header">${label(parentProperty.name)}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}}
+ <@outputValue property=parentProperty expression="${'#'}{_${parentName}.${parentProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
@@ -88,14 +87,14 @@
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
+ <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
+ <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}" indent=16/>
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
- ${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
+ <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
+ <@outputValue property=parentParentPojo.indentifierProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}" indent=16/>
</h:column>
</#if>
</#if>
@@ -108,11 +107,11 @@
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
<f:param name="${parentName}${componentProperty.name?cap_first}"
- value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
+ value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
<f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}"
- value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
+ value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}}"/>
</#if>
</s:link>
</h:column>
@@ -124,7 +123,7 @@
<#if c2h.isOneToManyCollection(property)>
<rich:tab label="${label(property.name)}">
- <div class="association" id="${property.name}Children">
+ <h:form styleClass="association" id="${property.name}Children">
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
@@ -135,7 +134,7 @@
rendered="${'#'}{empty ${homeName}.${property.name}}"/>
<rich:dataTable value="${'#'}{${homeName}.${property.name}}"
- var="${childName}"
+ var="_${childName}"
rendered="${'#'}{not empty ${homeName}.${property.name}}"
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
@@ -143,16 +142,16 @@
<#if !c2h.isCollection(childProperty) && !isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
- <h:column>
+ <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}">
<f:facet name="header">${label(componentProperty.name)}</f:facet>
- ${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
- </h:column>
+ <@outputValue property=componentProperty expression="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}" indent=16/>
+ </rich:column>
</#foreach>
<#else>
- <h:column>
+ <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}}">
<f:facet name="header">${label(childProperty.name)}</f:facet>
- <h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
- </h:column>
+ <@outputValue property=childProperty expression="${'#'}{_${childName}.${childProperty.name}}" indent=16/>
+ </rich:column>
</#if>
</#if>
</#foreach>
@@ -164,18 +163,18 @@
<#if childPojo.isComponent(childPojo.identifierProperty)>
<#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
<f:param name="${childName}${componentProperty.name?cap_first}"
- value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
+ value="${'#'}{_${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
<f:param name="${childName}${childPojo.identifierProperty.name?cap_first}"
- value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
+ value="${'#'}{_${childName}.${childPojo.identifierProperty.name}}"/>
</#if>
<f:param name="${childName}From" value="${entityName}"/>
</s:link>
</h:column>
</rich:dataTable>
- </div>
+ </h:form>
<div class="actionButtons">
<s:button
Modified: trunk/seam-gen/view/viewproperty.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/viewproperty.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
+++ trunk/seam-gen/view/viewproperty.xhtml.ftl 2008-10-12 05:26:44 UTC (rev 9264)
@@ -3,61 +3,15 @@
<#if !property.equals(pojo.identifierProperty) || property.value.identifierGeneratorStrategy == "assigned">
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
-
<s:decorate id="${componentProperty.name}" template="layout/display.xhtml">
<ui:define name="label">${label(componentProperty.name)}</ui:define>
-<#if isDate(componentProperty)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <s:convertDateTime type="date" dateStyle="short"/>
- </h:outputText>
-<#elseif isTime(componentProperty)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <s:convertDateTime type="time"/>
- </h:outputText>
-<#elseif isTimestamp(componentProperty)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <s:convertDateTime type="both" dateStyle="short"/>
- </h:outputText>
-<#elseif isBigDecimal(componentProperty)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <f:convertNumber/>
- </h:outputText>
-<#elseif isBigInteger(componentProperty)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
- <f:convertNumber integerOnly="true"/>
- </h:outputText>
-<#else>
- ${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}
-</#if>
+ <@outputValue property=componentProperty expression="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}" indent=12/>
</s:decorate>
</#foreach>
<#else>
-
<s:decorate id="${property.name}" template="layout/display.xhtml">
<ui:define name="label">${label(property.name)}</ui:define>
-<#if isDate(property)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}}">
- <s:convertDateTime type="date" dateStyle="short"/>
- </h:outputText>
-<#elseif isTime(property)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}}">
- <s:convertDateTime type="time"/>
- </h:outputText>
-<#elseif isTimestamp(property)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}}">
- <s:convertDateTime type="both" dateStyle="short"/>
- </h:outputText>
-<#elseif isBigDecimal(property)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}}">
- <f:convertNumber/>
- </h:outputText>
-<#elseif isBigInteger(property)>
- <h:outputText value="${'#'}{${homeName}.instance.${property.name}}">
- <f:convertNumber integerOnly="true"/>
- </h:outputText>
-<#else>
- ${'#'}{${homeName}.instance.${property.name}}
-</#if>
+ <@outputValue property=property expression="${'#'}{${homeName}.instance.${property.name}}" indent=12/>
</s:decorate>
</#if>
</#if>
16 years, 1 month
Seam SVN: r9263 - in trunk/seam-gen: src and 2 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-11 22:50:02 -0400 (Sat, 11 Oct 2008)
New Revision: 9263
Modified:
trunk/seam-gen/icefaces/view/edit.page.xml.ftl
trunk/seam-gen/icefaces/view/edit.xhtml.ftl
trunk/seam-gen/icefaces/view/editproperty.xhtml.ftl
trunk/seam-gen/icefaces/view/list.page.xml.ftl
trunk/seam-gen/icefaces/view/list.xhtml.ftl
trunk/seam-gen/icefaces/view/param.xml.ftl
trunk/seam-gen/icefaces/view/view.page.xml.ftl
trunk/seam-gen/icefaces/view/view.xhtml.ftl
trunk/seam-gen/icefaces/view/viewproperty.xhtml.ftl
trunk/seam-gen/src/EntityHome.java.ftl
trunk/seam-gen/src/EntityList.java.ftl
trunk/seam-gen/util/TypeInfo.ftl
trunk/seam-gen/view/edit.page.xml.ftl
trunk/seam-gen/view/edit.xhtml.ftl
trunk/seam-gen/view/editproperty.xhtml.ftl
trunk/seam-gen/view/list.page.xml.ftl
trunk/seam-gen/view/list.xhtml.ftl
trunk/seam-gen/view/param.xml.ftl
trunk/seam-gen/view/view.page.xml.ftl
trunk/seam-gen/view/view.xhtml.ftl
trunk/seam-gen/view/viewproperty.xhtml.ftl
Log:
fix generate-entities in JBossTools by making isToOne() a FreeMarker function
make labels out of property names by filtering them through label() function
Modified: trunk/seam-gen/icefaces/view/edit.page.xml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/edit.page.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/edit.page.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign pageName = entityName>
@@ -22,10 +22,10 @@
<action execute="${'#'}{${homeName}.wire}"/>
<param name="${componentName}From"/>
-<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
+<#assign idName = componentName + pojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
-<#assign cidName = componentName + util.upper(componentProperty.name)>
+<#assign cidName = componentName + componentProperty.name?cap_first>
<param name="${cidName}" value="${'#'}{${homeName}.${idName}.${componentProperty.name}}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/icefaces/view/edit.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,7 +1,7 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign pageName = entityName>
@@ -73,7 +73,7 @@
</ice:form>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
+<#if isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -83,15 +83,15 @@
<ice:panelTabSet id="editPanelTab${homeName}Id" styleClass="componentPanelTabSetLayout" style="margin-bottom:5px;margin-top:10px;">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
-<#assign parentName = util.lower(parentPojo.shortName)>
+<#assign parentName = parentPojo.shortName?uncap_first>
<#if property.optional>
- <ice:panelTab id="editTab${property.name}Id" label="${property.name}">
+ <ice:panelTab id="editTab${property.name}Id" label="${label(property.name)}">
<#else>
- <ice:panelTab id="editTab${property.name}Id" label="${property.name} *" >
+ <ice:panelTab id="editTab${property.name}Id" label="${label(property.name)} *" >
</#if>
<div class="association" id="${property.name}Parent">
@@ -104,51 +104,51 @@
columnClasses="allCols"
id="edit${property.name}TableId">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<ice:column id="editColumn${componentProperty.name}Id">
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="$editColumn${parentProperty.name}Id">
- <f:facet name="header">${parentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}}
</ice:column>
</#if>
</#if>
-<#if util.isToOne(parentProperty)>
+<#if isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
<ice:column id="$editColumn${parentProperty.name}Id">
- <f:facet name="header">${parentProperty.name} ${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="$editColumn${parentProperty.name}Id">
- <f:facet name="header">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
</ice:column>
</#if>
</#if>
</#foreach>
<ice:column id="editColumn${parentName}LinkId">
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link view="/${parentPageName}.xhtml"
id="view${parentName}"
value="View"
propagation="none">
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
- <f:param name="${parentName}${util.upper(componentProperty.name)}"
+ <f:param name="${parentName}${componentProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${parentName}${util.upper(parentPojo.identifierProperty.name)}"
+ <f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
</#if>
</s:link>
@@ -168,13 +168,13 @@
</ice:panelTab>
</#if>
<#if c2h.isOneToManyCollection(property)>
- <ice:panelTab id="editPanelTab${property.name}Id" label="${property.name}">
+ <ice:panelTab id="editPanelTab${property.name}Id" label="${label(property.name)}">
<div class="association" id="${property.name}Children">
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
<#assign childEditPageName = childPojo.shortName + "Edit">
-<#assign childName = util.lower(childPojo.shortName)>
+<#assign childName = childPojo.shortName?uncap_first>
<h:outputText value="There are no ${property.name} associated with this ${componentName}."
id="edit${property.name}TextId"
rendered="${'#'}{empty ${homeName}.${property.name}}"/>
@@ -185,35 +185,35 @@
columnClasses="allCols"
id="edit${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<ice:column id="edit${componentProperty.name}Id">
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="edit${childProperty.name}Id">
- <f:facet name="header">${childProperty.name}</f:facet>
+ <f:facet name="header">${label(childProperty.name)}</f:facet>
<h:outputText id="edit${childProperty.name}TextId" value="${'#'}{${childName}.${childProperty.name}}"/>
</ice:column>
</#if>
</#if>
</#foreach>
<ice:column id="edit${childName}Id">
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link view="/${childPageName}.xhtml"
id="select${childName}"
value="Select"
propagation="none">
<#if childPojo.isComponent(childPojo.identifierProperty)>
<#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
- <f:param name="${childName}${util.upper(componentProperty.name)}"
+ <f:param name="${childName}${componentProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${childName}${util.upper(childPojo.identifierProperty.name)}"
+ <f:param name="${childName}${childPojo.identifierProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
</#if>
<f:param name="${childName}From" value="${entityName}"/>
@@ -227,7 +227,7 @@
value="Add ${childName}"
view="/${childEditPageName}.xhtml"
propagation="none">
- <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}"
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
value="${'#'}{${homeName}.instance.${pojo.identifierProperty.name}}"/>
<f:param name="${childName}From" value="${entityName}"/>
</s:button>
Modified: trunk/seam-gen/icefaces/view/editproperty.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,6 +1,6 @@
<#include "../util/TypeInfo.ftl">
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#assign propertyIsId = property.equals(pojo.identifierProperty)>
<#if !propertyIsId || property.value.identifierGeneratorStrategy == "assigned">
<#if pojo.isComponent(property)>
@@ -8,7 +8,7 @@
<#assign column = componentProperty.columnIterator.next()>
<s:decorate id="${componentProperty.name}Decoration" template="layout/edit.xhtml">
- <ui:define name="label">${componentProperty.name}</ui:define>
+ <ui:define name="label">${label(componentProperty.name)}</ui:define>
<#if isDate(componentProperty)>
<ice:selectInputDate id="${componentProperty.name}Id"
renderAsPopup="true"
@@ -123,7 +123,7 @@
<#assign column = property.columnIterator.next()>
<s:decorate id="${property.name}Decoration" template="layout/edit.xhtml">
- <ui:define name="label">${property.name}</ui:define>
+ <ui:define name="label">${label(property.name)}</ui:define>
<#if isDate(property)>
<ice:selectInputDate id="${property.name}Id"
renderAsPopup="true"
Modified: trunk/seam-gen/icefaces/view/list.page.xml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/list.page.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/list.page.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -10,7 +10,7 @@
<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign listName = componentName + "List">
<param name="firstResult" value="${'#'}{${listName}.firstResult}"/>
@@ -18,7 +18,7 @@
<param name="dir" value="${'#'}{${listName}.orderDirection}"/>
<param name="from"/>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
Modified: trunk/seam-gen/icefaces/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -3,7 +3,7 @@
<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign listName = componentName + "List">
<#assign pageName = entityName>
<#assign editPageName = entityName + "Edit">
@@ -31,12 +31,12 @@
<ice:panelGroup id="listPanelGroup${entityName}Id" styleClass="edit">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
<s:decorate id="${componentProperty.name}decId" template="layout/display.xhtml">
- <ui:define name="label">${componentProperty.name}</ui:define>
+ <ui:define name="label">${label(componentProperty.name)}</ui:define>
<ice:inputText id="${componentProperty.name}TextId"
value="${'#'}{${listName}.${componentName}.${property.name}.${componentProperty.name}}"
partialSubmit="true"/>
@@ -47,7 +47,7 @@
<#else>
<#if isString(property)>
<s:decorate id="${property.name}decId" template="layout/display.xhtml">
- <ui:define name="label">${property.name}</ui:define>
+ <ui:define name="label">${label(property.name)}</ui:define>
<ice:inputText id="list${property.name}TextId"
value="${'#'}{${listName}.${componentName}.${property.name}}"
partialSubmit="true"/>
@@ -83,7 +83,7 @@
columnClasses="allCols"
rendered="${'#'}{not empty ${listName}.resultList}">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<ice:column id="list${componentProperty.name}Id">
@@ -91,7 +91,7 @@
<#assign propertyPath = property.name + '.' + componentProperty.name>
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${componentProperty.name}"/>
+ <ui:param name="propertyLabel" value="${label(componentProperty.name)}"/>
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
@@ -103,7 +103,7 @@
<f:facet name="header">
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${property.name}"/>
+ <ui:param name="propertyLabel" value="${label(property.name)}"/>
<ui:param name="propertyPath" value="${property.name}"/>
</ui:include>
</f:facet>
@@ -111,7 +111,7 @@
</ice:column>
</#if>
</#if>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
@@ -120,7 +120,7 @@
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name + '.' + componentProperty.name>
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${property.name} ${componentProperty.name}"/>
+ <ui:param name="propertyLabel" value="${label(property.name)} ${label(componentProperty.name)?uncap_first}"/>
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
@@ -133,7 +133,7 @@
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name>
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${property.name} ${parentPojo.identifierProperty.name}"/>
+ <ui:param name="propertyLabel" value="${label(property.name)} ${label(parentPojo.identifierProperty.name)?uncap_first}"/>
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
@@ -143,17 +143,17 @@
</#if>
</#foreach>
<ice:column id="listColumn${pageName}Id">
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link view="/${'#'}{empty from ? '${pageName}' : from}.xhtml"
value="Select"
id="list${componentName}LinkId">
<#if pojo.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
- <f:param name="${componentName}${util.upper(componentProperty.name)}"
+ <f:param name="${componentName}${componentProperty.name?cap_first}"
value="${'#'}{${componentName}.${pojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}"
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
value="${'#'}{${componentName}.${pojo.identifierProperty.name}}"/>
</#if>
</s:link>
@@ -202,10 +202,10 @@
<s:button view="/${editPageName}.xhtml"
id="listCreate${componentName}Id"
value="Create ${componentName}">
-<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
+<#assign idName = componentName + pojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
-<#assign cidName = componentName + util.upper(componentProperty.name)>
+<#assign cidName = componentName + componentProperty.name?cap_first>
<f:param name="${cidName}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/icefaces/view/param.xml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/param.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/param.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,14 +1,15 @@
+<#include "../util/TypeInfo.ftl">
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if entities.add(parentPojo.shortName)>
-<#assign parentComponentName = util.lower(parentPojo.shortName)>
+<#assign parentComponentName = parentPojo.shortName?uncap_first>
<#assign parentHomeName = parentComponentName + "Home">
<param name="${parentComponentName}From"/>
-<#assign parentIdName = parentComponentName + util.upper(parentPojo.identifierProperty.name)>
+<#assign parentIdName = parentComponentName + parentPojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(parentPojo.identifierProperty)>
<#foreach parentComponentProperty in parentPojo.identifierProperty.value.propertyIterator>
-<#assign parentCidName = parentComponentName + util.upper(parentComponentProperty.name)>
+<#assign parentCidName = parentComponentName + parentComponentProperty.name?cap_first>
<param name="${parentCidName}" value="${'#'}{${parentHomeName}.${parentIdName}.${parentComponentProperty.name}}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/icefaces/view/view.page.xml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/view.page.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/view.page.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -9,14 +9,14 @@
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<param name="${componentName}From"/>
-<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
+<#assign idName = componentName + pojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
-<#assign cidName = componentName + util.upper(componentProperty.name)>
+<#assign cidName = componentName + componentProperty.name?cap_first>
<param name="${cidName}" value="${'#'}{${homeName}.${idName}.${componentProperty.name}}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/icefaces/view/view.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,7 +1,9 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<#include "../util/TypeInfo.ftl">
+
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign editPageName = entityName + "Edit">
@@ -26,7 +28,7 @@
</table>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#include "viewproperty.xhtml.ftl">
</#if>
</#foreach>
@@ -49,7 +51,7 @@
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
+<#if isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -61,12 +63,12 @@
style="margin-bottom:5px;margin-top:10px;">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
-<#assign parentName = util.lower(parentPojo.shortName)>
+<#assign parentName = parentPojo.shortName?uncap_first>
- <ice:panelTab id="view${property.name}panelTab" label="${property.name}">
+ <ice:panelTab id="view${property.name}panelTab" label="${label(property.name)}">
<div class="association" id="${property.name}Parent">
<h:outputText value="There is no ${property.name} associated with this ${componentName}."
@@ -80,50 +82,50 @@
columnClasses="allCols"
id="view${property.name}TableId">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<ice:column id="viewColumn${componentProperty.name}Id">
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="view${parentProperty.name}Id">
- <f:facet name="header">${parentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}}
</ice:column>
</#if>
</#if>
-<#if util.isToOne(parentProperty)>
+<#if isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
<ice:column id="view${parentProperty.name}ColumnId">
- <f:facet name="header">${parentProperty.name} ${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="view${parentParentPojo.identifierProperty.name}ColumnName">
- <f:facet name="header">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
</ice:column>
</#if>
</#if>
</#foreach>
<ice:column id="view${parentName}ColumnId">
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link id="view${parentName}LinkId"
value="View"
view="/${parentPageName}.xhtml">
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
- <f:param name="${parentName}${util.upper(componentProperty.name)}"
+ <f:param name="${parentName}${componentProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${parentName}${util.upper(parentPojo.identifierProperty.name)}"
+ <f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
</#if>
</s:link>
@@ -135,13 +137,13 @@
</#if>
<#if c2h.isOneToManyCollection(property)>
- <ice:panelTab label="${property.name}">
+ <ice:panelTab label="${label(property.name)}">
<div class="association" id="view${property.name}ChildrenId">
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
<#assign childEditPageName = childPojo.shortName + "Edit">
-<#assign childName = util.lower(childPojo.shortName)>
+<#assign childName = childPojo.shortName?uncap_first>
<#assign childHomeName = childName + "Home">
<h:outputText value="There are no ${property.name} associated with this ${componentName}."
id="view${property.name}ChildTextId"
@@ -154,17 +156,17 @@
columnClasses="allCols"
id="view${property.name}TableId">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<ice:column id="view${componentProperty.name}Id">
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="view${childProperty.name}Id">
- <f:facet name="header">${childProperty.name}</f:facet>
+ <f:facet name="header">${label(childProperty.name)}</f:facet>
<h:outputText id="view${childProperty.name}TextId"
value="${'#'}{${childName}.${childProperty.name}}"/>
</ice:column>
@@ -172,17 +174,17 @@
</#if>
</#foreach>
<ice:column>
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link id="select${childName}LinkId"
value="Select"
view="/${childPageName}.xhtml">
<#if childPojo.isComponent(childPojo.identifierProperty)>
<#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
- <f:param name="${childName}${util.upper(componentProperty.name)}"
+ <f:param name="${childName}${componentProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${childName}${util.upper(childPojo.identifierProperty.name)}"
+ <f:param name="${childName}${childPojo.identifierProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
</#if>
<f:param name="${childName}From" value="${entityName}"/>
@@ -196,7 +198,7 @@
<s:button id="viewAdd${childName}ButtonId"
value="Add ${childName}"
view="/${childEditPageName}.xhtml">
- <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}"
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
value="${'#'}{${homeName}.instance.${pojo.identifierProperty.name}}"/>
<f:param name="${childName}From" value="${entityName}"/>
</s:button>
Modified: trunk/seam-gen/icefaces/view/viewproperty.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/viewproperty.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/icefaces/view/viewproperty.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -5,7 +5,7 @@
<#foreach componentProperty in property.value.propertyIterator>
<s:decorate id="${componentProperty.name}" template="layout/display.xhtml">
- <ui:define name="label">${componentProperty.name}</ui:define>
+ <ui:define name="label">${label(componentProperty.name)}</ui:define>
<#if isDate(componentProperty)>
<ice:outputText id="view${componentProperty.name}TextId"
value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
@@ -39,7 +39,7 @@
<#else>
<s:decorate id="${property.name}" template="layout/display.xhtml">
- <ui:define name="label">${property.name}</ui:define>
+ <ui:define name="label">${label(property.name)}</ui:define>
<#if isDate(property)>
<ice:outputText id="view${property.name}TextId"
value="${'#'}{${homeName}.instance.${property.name}}">
Modified: trunk/seam-gen/src/EntityHome.java.ftl
===================================================================
--- trunk/seam-gen/src/EntityHome.java.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/src/EntityHome.java.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,22 +1,23 @@
+<#include "../util/TypeInfo.ftl">
package ${actionPackage};
<#assign classbody>
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
@${pojo.importType("org.jboss.seam.annotations.Name")}("${homeName}")
public class ${entityName}Home extends ${pojo.importType("org.jboss.seam.framework.EntityHome")}<${entityName}>
{
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
-<#assign parentHomeName = util.lower(parentPojo.shortName) + "Home">
+<#assign parentHomeName = parentPojo.shortName?uncap_first + "Home">
@${pojo.importType("org.jboss.seam.annotations.In")}(create=true)
${parentPojo.shortName}Home ${parentHomeName};
</#if>
</#foreach>
-<#assign idName = entityName + util.upper(pojo.identifierProperty.name)>
+<#assign idName = entityName + pojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(pojo.identifierProperty)>
<#assign idType = entityName + "Id">
<#else>
@@ -69,10 +70,10 @@
{
getInstance();
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.shortName!=pojo.shortName>
-<#assign parentHomeName = util.lower(parentPojo.shortName) + "Home">
+<#assign parentHomeName = parentPojo.shortName?uncap_first + "Home">
<#assign setter = "set" + pojo.getPropertyName(property)>
${parentPojo.shortName} ${property.name}=${parentHomeName}.getDefinedInstance();
if ( ${property.name}!=null )
@@ -87,7 +88,7 @@
public boolean isWired()
{
<#foreach property in pojo.allPropertiesIterator>
-<#if (util.isToOne(property) && !property.optional)>
+<#if (isToOne(property) && !property.optional)>
<#assign getter = pojo.getGetterSignature(property)>
if ( getInstance().${getter}()==null ) return false;
</#if>
Modified: trunk/seam-gen/src/EntityList.java.ftl
===================================================================
--- trunk/seam-gen/src/EntityList.java.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/src/EntityList.java.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,6 +1,6 @@
<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign listName = componentName + "List">
package ${actionPackage};
@@ -19,7 +19,7 @@
private static final String[] RESTRICTIONS = {
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property)>
+<#if !c2h.isCollection(property) && !isToOne(property)>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
Modified: trunk/seam-gen/util/TypeInfo.ftl
===================================================================
(Binary files differ)
Modified: trunk/seam-gen/view/edit.page.xml.ftl
===================================================================
--- trunk/seam-gen/view/edit.page.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/edit.page.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign pageName = entityName>
@@ -15,10 +15,10 @@
<action execute="${'#'}{${homeName}.wire}"/>
<param name="${componentName}From"/>
-<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
+<#assign idName = componentName + pojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
-<#assign cidName = componentName + util.upper(componentProperty.name)>
+<#assign cidName = componentName + componentProperty.name?cap_first>
<param name="${cidName}" value="${'#'}{${homeName}.${idName}.${componentProperty.name}}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/view/edit.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/edit.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/edit.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,7 +1,7 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign pageName = entityName>
@@ -67,7 +67,7 @@
</h:form>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
+<#if isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -76,15 +76,15 @@
<rich:tabPanel switchType="ajax">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
-<#assign parentName = util.lower(parentPojo.shortName)>
+<#assign parentName = parentPojo.shortName?uncap_first>
<#if property.optional>
- <rich:tab label="${property.name}">
+ <rich:tab label="${label(property.name)}">
<#else>
- <rich:tab label="${property.name} *" labelClass="required">
+ <rich:tab label="${label(property.name)} *" labelClass="required">
</#if>
<div class="association" id="${property.name}Parent">
@@ -97,51 +97,51 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${parentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}}
</h:column>
</#if>
</#if>
-<#if util.isToOne(parentProperty)>
+<#if isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${parentProperty.name} ${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
</h:column>
</#if>
</#if>
</#foreach>
<h:column>
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link view="/${parentPageName}.xhtml"
id="view${parentName}"
value="View"
propagation="none">
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
- <f:param name="${parentName}${util.upper(componentProperty.name)}"
+ <f:param name="${parentName}${componentProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${parentName}${util.upper(parentPojo.identifierProperty.name)}"
+ <f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
</#if>
</s:link>
@@ -162,13 +162,13 @@
</#if>
<#if c2h.isOneToManyCollection(property)>
- <rich:tab label="${property.name}">
+ <rich:tab label="${label(property.name)}">
<div class="association" id="${property.name}Children">
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
<#assign childEditPageName = childPojo.shortName + "Edit">
-<#assign childName = util.lower(childPojo.shortName)>
+<#assign childName = childPojo.shortName?uncap_first>
<h:outputText value="There are no ${property.name} associated with this ${componentName}."
rendered="${'#'}{empty ${homeName}.${property.name}}"/>
@@ -178,35 +178,35 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${childProperty.name}</f:facet>
+ <f:facet name="header">${label(childProperty.name)}</f:facet>
<h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
</h:column>
</#if>
</#if>
</#foreach>
<h:column>
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link view="/${childPageName}.xhtml"
id="select${childName}"
value="View"
propagation="none">
<#if childPojo.isComponent(childPojo.identifierProperty)>
<#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
- <f:param name="${childName}${util.upper(componentProperty.name)}"
+ <f:param name="${childName}${componentProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${childName}${util.upper(childPojo.identifierProperty.name)}"
+ <f:param name="${childName}${childPojo.identifierProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
</#if>
<f:param name="${childName}From" value="${entityName}"/>
@@ -222,7 +222,7 @@
value="Add ${childName}"
view="/${childEditPageName}.xhtml"
propagation="none">
- <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}"
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
value="${'#'}{${homeName}.instance.${pojo.identifierProperty.name}}"/>
<f:param name="${childName}From" value="${entityName}"/>
</s:button>
Modified: trunk/seam-gen/view/editproperty.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/editproperty.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/editproperty.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,6 +1,6 @@
<#include "../util/TypeInfo.ftl">
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#assign propertyIsId = property.equals(pojo.identifierProperty)>
<#if !propertyIsId || property.value.identifierGeneratorStrategy == "assigned">
<#if pojo.isComponent(property)>
@@ -8,7 +8,7 @@
<#assign column = componentProperty.columnIterator.next()>
<s:decorate id="${componentProperty.name}Field" template="layout/edit.xhtml">
- <ui:define name="label">${componentProperty.name}</ui:define>
+ <ui:define name="label">${label(componentProperty.name)}</ui:define>
<#if isDate(componentProperty)>
<rich:calendar id="${componentProperty.name}"
<#if propertyIsId>
@@ -119,7 +119,7 @@
<#assign property = property.value.typeName>
<s:decorate id="${property.name}Field" template="layout/edit.xhtml">
- <ui:define name="label">${property.name}</ui:define>
+ <ui:define name="label">${label(property.name)}</ui:define>
<#if isDate(property)>
<rich:calendar id="${property.name}"
<#if propertyIsId>
Modified: trunk/seam-gen/view/list.page.xml.ftl
===================================================================
--- trunk/seam-gen/view/list.page.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/list.page.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -5,7 +5,7 @@
<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign listName = componentName + "List">
<param name="firstResult" value="${'#'}{${listName}.firstResult}"/>
<param name="sort" value="${'#'}{${listName}.orderColumn}"/>
@@ -13,7 +13,7 @@
<param name="from"/>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
Modified: trunk/seam-gen/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/list.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/list.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -3,7 +3,7 @@
<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign listName = componentName + "List">
<#assign pageName = entityName>
<#assign editPageName = entityName + "Edit">
@@ -24,12 +24,12 @@
<rich:simpleTogglePanel label="${entityName} search filter" switchType="ajax">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
<s:decorate template="layout/display.xhtml">
- <ui:define name="label">${componentProperty.name}</ui:define>
+ <ui:define name="label">${label(componentProperty.name)}</ui:define>
<h:inputText id="${componentProperty.name}" value="${'#'}{${listName}.${componentName}.${property.name}.${componentProperty.name}}"/>
</s:decorate>
@@ -38,7 +38,7 @@
<#else>
<#if isString(property)>
<s:decorate template="layout/display.xhtml">
- <ui:define name="label">${property.name}</ui:define>
+ <ui:define name="label">${label(property.name)}</ui:define>
<h:inputText id="${property.name}" value="${'#'}{${listName}.${componentName}.${property.name}}"/>
</s:decorate>
@@ -67,7 +67,7 @@
value="${'#'}{${listName}.resultList}"
rendered="${'#'}{not empty ${listName}.resultList}">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<h:column>
@@ -75,7 +75,7 @@
<#assign propertyPath = property.name + '.' + componentProperty.name>
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${componentProperty.name}"/>
+ <ui:param name="propertyLabel" value="${label(componentProperty.name)}"/>
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
@@ -87,7 +87,7 @@
<f:facet name="header">
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${property.name}"/>
+ <ui:param name="propertyLabel" value="${label(property.name)}"/>
<ui:param name="propertyPath" value="${property.name}"/>
</ui:include>
</f:facet>
@@ -95,7 +95,7 @@
</h:column>
</#if>
</#if>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
@@ -104,7 +104,7 @@
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name + '.' + componentProperty.name>
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${property.name} ${componentProperty.name}"/>
+ <ui:param name="propertyLabel" value="${label(property.name)} ${label(componentProperty.name)?uncap_first}"/>
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
@@ -117,7 +117,7 @@
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name>
<ui:include src="layout/sort.xhtml">
<ui:param name="entityList" value="${'#'}{${listName}}"/>
- <ui:param name="propertyLabel" value="${property.name} ${parentPojo.identifierProperty.name}"/>
+ <ui:param name="propertyLabel" value="${label(property.name)} ${label(parentPojo.identifierProperty.name)?uncap_first}"/>
<ui:param name="propertyPath" value="${propertyPath}"/>
</ui:include>
</f:facet>
@@ -127,17 +127,17 @@
</#if>
</#foreach>
<h:column>
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link view="/${'#'}{empty from ? '${pageName}' : from}.xhtml"
value="${'#'}{empty from ? 'View' : 'Select'}"
id="${componentName}">
<#if pojo.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
- <f:param name="${componentName}${util.upper(componentProperty.name)}"
+ <f:param name="${componentName}${componentProperty.name?cap_first}"
value="${'#'}{${componentName}.${pojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}"
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
value="${'#'}{${componentName}.${pojo.identifierProperty.name}}"/>
</#if>
</s:link>
@@ -186,10 +186,10 @@
<s:button view="/${editPageName}.xhtml"
id="create"
value="Create ${componentName}">
-<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
+<#assign idName = componentName + pojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
-<#assign cidName = componentName + util.upper(componentProperty.name)>
+<#assign cidName = componentName + componentProperty.name?cap_first>
<f:param name="${cidName}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/view/param.xml.ftl
===================================================================
--- trunk/seam-gen/view/param.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/param.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,14 +1,15 @@
+<#include "../util/TypeInfo.ftl">
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if entities.add(parentPojo.shortName)>
-<#assign parentComponentName = util.lower(parentPojo.shortName)>
+<#assign parentComponentName = parentPojo.shortName?uncap_first>
<#assign parentHomeName = parentComponentName + "Home">
<param name="${parentComponentName}From"/>
-<#assign parentIdName = parentComponentName + util.upper(parentPojo.identifierProperty.name)>
+<#assign parentIdName = parentComponentName + parentPojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(parentPojo.identifierProperty)>
<#foreach parentComponentProperty in parentPojo.identifierProperty.value.propertyIterator>
-<#assign parentCidName = parentComponentName + util.upper(parentComponentProperty.name)>
+<#assign parentCidName = parentComponentName + parentComponentProperty.name?cap_first>
<param name="${parentCidName}" value="${'#'}{${parentHomeName}.${parentIdName}.${parentComponentProperty.name}}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/view/view.page.xml.ftl
===================================================================
--- trunk/seam-gen/view/view.page.xml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/view.page.xml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -4,13 +4,13 @@
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.1.xsd">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<param name="${componentName}From"/>
-<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
+<#assign idName = componentName + pojo.identifierProperty.name?cap_first>
<#if c2j.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
-<#assign cidName = componentName + util.upper(componentProperty.name)>
+<#assign cidName = componentName + componentProperty.name?cap_first>
<param name="${cidName}" value="${'#'}{${homeName}.${idName}.${componentProperty.name}}"/>
</#foreach>
<#else>
Modified: trunk/seam-gen/view/view.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/view.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/view.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -1,7 +1,8 @@
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<#include "../util/TypeInfo.ftl">
<#assign entityName = pojo.shortName>
-<#assign componentName = util.lower(entityName)>
+<#assign componentName = entityName?uncap_first>
<#assign homeName = componentName + "Home">
<#assign masterPageName = entityName + "List">
<#assign editPageName = entityName + "Edit">
@@ -19,7 +20,7 @@
<rich:panel>
<f:facet name="header">${entityName}</f:facet>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#include "viewproperty.xhtml.ftl">
</#if>
</#foreach>
@@ -41,7 +42,7 @@
</div>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
+<#if isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -50,12 +51,12 @@
<rich:tabPanel switchType="ajax">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if util.isToOne(property)>
+<#if isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
-<#assign parentName = util.lower(parentPojo.shortName)>
+<#assign parentName = parentPojo.shortName?uncap_first>
- <rich:tab label="${property.name}">
+ <rich:tab label="${label(property.name)}">
<div class="association" id="${property.name}Parent">
<h:outputText value="There is no ${property.name} associated with this ${componentName}."
@@ -67,50 +68,50 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${parentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)}</f:facet>
${'#'}{${parentName}.${parentProperty.name}}
</h:column>
</#if>
</#if>
-<#if util.isToOne(parentProperty)>
+<#if isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${parentProperty.name} ${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(componentProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</f:facet>
+ <f:facet name="header">${label(parentProperty.name)} ${label(parentParentPojo.identifierProperty.name)?uncap_first}</f:facet>
${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
</h:column>
</#if>
</#if>
</#foreach>
<h:column>
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link id="view${parentName}"
value="View"
view="/${parentPageName}.xhtml">
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
- <f:param name="${parentName}${util.upper(componentProperty.name)}"
+ <f:param name="${parentName}${componentProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${parentName}${util.upper(parentPojo.identifierProperty.name)}"
+ <f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}"
value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
</#if>
</s:link>
@@ -122,13 +123,13 @@
</#if>
<#if c2h.isOneToManyCollection(property)>
- <rich:tab label="${property.name}">
+ <rich:tab label="${label(property.name)}">
<div class="association" id="${property.name}Children">
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
<#assign childEditPageName = childPojo.shortName + "Edit">
-<#assign childName = util.lower(childPojo.shortName)>
+<#assign childName = childPojo.shortName?uncap_first>
<#assign childHomeName = childName + "Home">
<h:outputText value="There are no ${property.name} associated with this ${componentName}."
rendered="${'#'}{empty ${homeName}.${property.name}}"/>
@@ -139,34 +140,34 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<h:column>
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">${label(componentProperty.name)}</f:facet>
${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
</h:column>
</#foreach>
<#else>
<h:column>
- <f:facet name="header">${childProperty.name}</f:facet>
+ <f:facet name="header">${label(childProperty.name)}</f:facet>
<h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
</h:column>
</#if>
</#if>
</#foreach>
<h:column>
- <f:facet name="header">action</f:facet>
+ <f:facet name="header">Action</f:facet>
<s:link id="select${childName}"
value="Select"
view="/${childPageName}.xhtml">
<#if childPojo.isComponent(childPojo.identifierProperty)>
<#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
- <f:param name="${childName}${util.upper(componentProperty.name)}"
+ <f:param name="${childName}${componentProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
</#foreach>
<#else>
- <f:param name="${childName}${util.upper(childPojo.identifierProperty.name)}"
+ <f:param name="${childName}${childPojo.identifierProperty.name?cap_first}"
value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
</#if>
<f:param name="${childName}From" value="${entityName}"/>
@@ -180,7 +181,7 @@
<s:button
value="Add ${childName}"
view="/${childEditPageName}.xhtml">
- <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}"
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
value="${'#'}{${homeName}.instance.${pojo.identifierProperty.name}}"/>
<f:param name="${childName}From" value="${entityName}"/>
</s:button>
Modified: trunk/seam-gen/view/viewproperty.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/viewproperty.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
+++ trunk/seam-gen/view/viewproperty.xhtml.ftl 2008-10-12 02:50:02 UTC (rev 9263)
@@ -5,7 +5,7 @@
<#foreach componentProperty in property.value.propertyIterator>
<s:decorate id="${componentProperty.name}" template="layout/display.xhtml">
- <ui:define name="label">${componentProperty.name}</ui:define>
+ <ui:define name="label">${label(componentProperty.name)}</ui:define>
<#if isDate(componentProperty)>
<h:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
<s:convertDateTime type="date" dateStyle="short"/>
@@ -34,7 +34,7 @@
<#else>
<s:decorate id="${property.name}" template="layout/display.xhtml">
- <ui:define name="label">${property.name}</ui:define>
+ <ui:define name="label">${label(property.name)}</ui:define>
<#if isDate(property)>
<h:outputText value="${'#'}{${homeName}.instance.${property.name}}">
<s:convertDateTime type="date" dateStyle="short"/>
16 years, 1 month
Seam SVN: r9262 - in trunk/seam-gen: view/layout and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-11 17:21:16 -0400 (Sat, 11 Oct 2008)
New Revision: 9262
Modified:
trunk/seam-gen/icefaces/view/layout/menu.xhtml
trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl
trunk/seam-gen/view/layout/menu.xhtml
trunk/seam-gen/view/layout/menu.xhtml.ftl
Log:
conversation should not be propagated for links in the toolbar since these are "exit" or "sidestep" links
Modified: trunk/seam-gen/icefaces/view/layout/menu.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/layout/menu.xhtml 2008-10-11 21:14:55 UTC (rev 9261)
+++ trunk/seam-gen/icefaces/view/layout/menu.xhtml 2008-10-11 21:21:16 UTC (rev 9262)
@@ -12,14 +12,14 @@
<ice:panelGrid id="menuPanelGrid" columns="2" columnClasses="leftMenu,rightMenu">
<ice:panelGroup id="menuPanelGroupLeft" >
<h:outputText id="menuProjectName" value="#{projectName}:"/>
- <s:link id="menuHomeId" view="/home.xhtml" value="Home"/>
+ <s:link id="menuHomeId" view="/home.xhtml" value="Home" propagation="none"/>
<!-- @newMenuItem@ -->
</ice:panelGroup>
<ice:panelGroup id="menuPanelGroupRight" >
<h:outputText id="menuWelcomeId" value="signed in as: #{identity.username}" rendered="#{identity.loggedIn}"/>
- <s:link id="menuLoginId" view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}"/>
- <s:link id="menuLogoutId" view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
+ <s:link id="menuLoginId" view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}" propagation="none"/>
+ <s:link id="menuLogoutId" view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}" propagation="none"/>
</ice:panelGroup>
</ice:panelGrid>
</td>
Modified: trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl 2008-10-11 21:14:55 UTC (rev 9261)
+++ trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
@@ -12,7 +12,7 @@
<ice:panelGrid id="menuPanelGrid" columns="2" columnClasses="leftMenu,rightMenu">
<ice:panelGroup id="leftMenuId" >
<ice:outputText id="menuProjectNameId" value="${'#'}{projectName}:"/>
- <s:link id="menuHomeId" view="/home.xhtml" value="Home"/>
+ <s:link id="menuHomeId" view="/home.xhtml" value="Home" propagation="none"/>
<#foreach entity in c2j.getPOJOIterator(cfg.classMappings)>
<s:link view="/${entity.shortName}List.xhtml"
value="${entity.shortName} List"
@@ -25,8 +25,8 @@
</ice:panelGroup>
<ice:panelGroup id="rightMenuId">
<h:outputText id="menuWelcomeId" value="signed in as: ${'#'}{identity.username}" rendered="${'#'}{identity.loggedIn}"/>
- <s:link view="/login.xhtml" id="menuLoginId" value="Login" rendered="${'#'}{not identity.loggedIn}" />
- <s:link view="/home.xhtml" id="menulogoutId" action="${'#'}{identity.logout}" value="Logout" rendered="${'#'}{identity.loggedIn}"/>
+ <s:link view="/login.xhtml" id="menuLoginId" value="Login" rendered="${'#'}{not identity.loggedIn}" propagation="none"/>
+ <s:link view="/home.xhtml" id="menulogoutId" action="${'#'}{identity.logout}" value="Logout" rendered="${'#'}{identity.loggedIn}" propagation="none"/>
</ice:panelGroup>
</ice:panelGrid>
</td>
Modified: trunk/seam-gen/view/layout/menu.xhtml
===================================================================
--- trunk/seam-gen/view/layout/menu.xhtml 2008-10-11 21:14:55 UTC (rev 9261)
+++ trunk/seam-gen/view/layout/menu.xhtml 2008-10-11 21:21:16 UTC (rev 9262)
@@ -7,12 +7,12 @@
xmlns:rich="http://richfaces.org/rich">
<rich:toolBarGroup>
<h:outputText value="#{projectName}:"/>
- <s:link view="/home.xhtml" value="Home"/>
+ <s:link view="/home.xhtml" value="Home" propagation="none"/>
</rich:toolBarGroup>
<!-- @newMenuItem@ -->
<rich:toolBarGroup location="right">
<h:outputText value="signed in as: #{identity.username}" rendered="#{identity.loggedIn}"/>
- <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}"/>
- <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
+ <s:link view="/login.xhtml" value="Login" rendered="#{not identity.loggedIn}" propagation="none"/>
+ <s:link view="/home.xhtml" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}" propagation="none"/>
</rich:toolBarGroup>
</rich:toolBar>
Modified: trunk/seam-gen/view/layout/menu.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/layout/menu.xhtml.ftl 2008-10-11 21:14:55 UTC (rev 9261)
+++ trunk/seam-gen/view/layout/menu.xhtml.ftl 2008-10-11 21:21:16 UTC (rev 9262)
@@ -7,7 +7,7 @@
xmlns:rich="http://richfaces.org/rich">
<rich:toolBarGroup>
<h:outputText value="${'#'}{projectName}:"/>
- <s:link view="/home.xhtml" value="Home"/>
+ <s:link view="/home.xhtml" value="Home" propagation="none"/>
</rich:toolBarGroup>
<#foreach entity in c2j.getPOJOIterator(cfg.classMappings)>
<s:link view="/${entity.shortName}List.xhtml"
@@ -19,7 +19,7 @@
<!-- @newMenuItem@ -->
<rich:toolBarGroup location="right">
<h:outputText value="signed in as: ${'#'}{identity.username}" rendered="${'#'}{identity.loggedIn}"/>
- <s:link view="/login.xhtml" value="Login" rendered="${'#'}{not identity.loggedIn}"/>
- <s:link view="/home.xhtml" action="${'#'}{identity.logout}" value="Logout" rendered="${'#'}{identity.loggedIn}"/>
+ <s:link view="/login.xhtml" value="Login" rendered="${'#'}{not identity.loggedIn}" propagation="none"/>
+ <s:link view="/home.xhtml" action="${'#'}{identity.logout}" value="Logout" rendered="${'#'}{identity.loggedIn}" propagation="none"/>
</rich:toolBarGroup>
</rich:toolBar>
16 years, 1 month
Seam SVN: r9261 - in trunk/seam-gen: view/layout and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-11 17:14:55 -0400 (Sat, 11 Oct 2008)
New Revision: 9261
Modified:
trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl
trunk/seam-gen/view/layout/menu.xhtml.ftl
Log:
JBSEAM-2330 - value should be null rather than empty string (null suppresses the parameter)
Modified: trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl 2008-10-11 15:57:58 UTC (rev 9260)
+++ trunk/seam-gen/icefaces/view/layout/menu.xhtml.ftl 2008-10-11 21:14:55 UTC (rev 9261)
@@ -17,7 +17,9 @@
<s:link view="/${entity.shortName}List.xhtml"
value="${entity.shortName} List"
id="${entity.shortName}Id"
- propagation="none"/>
+ propagation="none">
+ <f:param name="from"/>
+ </s:link>
</#foreach>
<!-- @newMenuItem@ -->
</ice:panelGroup>
Modified: trunk/seam-gen/view/layout/menu.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/layout/menu.xhtml.ftl 2008-10-11 15:57:58 UTC (rev 9260)
+++ trunk/seam-gen/view/layout/menu.xhtml.ftl 2008-10-11 21:14:55 UTC (rev 9261)
@@ -13,7 +13,7 @@
<s:link view="/${entity.shortName}List.xhtml"
value="${entity.shortName} List"
propagation="none">
- <f:param name="from" value="" />
+ <f:param name="from"/>
</s:link>
</#foreach>
<!-- @newMenuItem@ -->
16 years, 1 month
Seam SVN: r9260 - in trunk/src/excel/org/jboss/seam/excel: jxl and 1 other directory.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2008-10-11 11:57:58 -0400 (Sat, 11 Oct 2008)
New Revision: 9260
Modified:
trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java
trunk/src/excel/org/jboss/seam/excel/jxl/JXLFactory.java
Log:
minor
Modified: trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java 2008-10-11 05:38:57 UTC (rev 9259)
+++ trunk/src/excel/org/jboss/seam/excel/exporter/ExcelExporter.java 2008-10-11 15:57:58 UTC (rev 9260)
@@ -31,8 +31,6 @@
import org.jboss.seam.excel.ui.UIColumn;
import org.jboss.seam.excel.ui.UIWorkbook;
import org.jboss.seam.excel.ui.UIWorksheet;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
import org.jboss.seam.navigation.Pages;
/**
@@ -47,14 +45,11 @@
@BypassInterceptors
public class ExcelExporter
{
- private static Log log = Logging.getLog(ExcelExporter.class);
-
// The excel workbook implementation
private ExcelWorkbook excelWorkbook = null;
-
+
// A map of known column widths
private Map<Integer, Integer> columnWidths = new HashMap<Integer, Integer>();
-
/**
* Helper method to call the exporter and use the default excel workbook
@@ -77,7 +72,6 @@
@SuppressWarnings("unchecked")
public void export(String dataTableId, String type)
{
- // TODO: support "type" ?
excelWorkbook = ExcelFactory.instance().getExcelWorkbook(type);
// Gets the datatable
@@ -126,9 +120,10 @@
redirectExport();
}
-
+
/**
* Parses column widths from a worksheet tag
+ *
* @param worksheet The worksheet to get the style from
* @return The map of column number -> column width
*/
@@ -202,7 +197,8 @@
}
Integer columnWidth = columnWidths.get(columnIndex);
- if (columnWidth != null) {
+ if (columnWidth != null)
+ {
UIColumn uiColumn = new UIColumn();
uiColumn.setStyle(CSSNames.COLUMN_WIDTH + ":" + columnWidth);
excelWorkbook.applyColumnSettings(uiColumn);
Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLFactory.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLFactory.java 2008-10-11 05:38:57 UTC (rev 9259)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLFactory.java 2008-10-11 15:57:58 UTC (rev 9260)
@@ -404,7 +404,7 @@
/**
* Creates a JExcelAPI date display format
*
- * @param The format mask
+ * @param mask The format mask
* @return The display format
* @see <a
* href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/Da...">DateFormat</a>
@@ -487,7 +487,7 @@
/**
* Creates a JExcelAPI representation of a vertical alignment
*
- * @param color The requested alignment
+ * @param verticalAlignment The requested alignment
* @return The alignment representation
* @see <a
* href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/V...">VerticalAlignment</a>
16 years, 1 month
Seam SVN: r9259 - in trunk/seam-gen: icefaces/view/layout and 2 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-11 01:38:57 -0400 (Sat, 11 Oct 2008)
New Revision: 9259
Added:
trunk/seam-gen/icefaces/view/layout/sort.xhtml
trunk/seam-gen/view/layout/sort.xhtml
Modified:
trunk/seam-gen/icefaces/view/list.xhtml.ftl
trunk/seam-gen/view/list.xhtml.ftl
Log:
introduce template for creating column sort links, thus making it waaaaaay cleaner
Added: trunk/seam-gen/icefaces/view/layout/sort.xhtml
===================================================================
--- trunk/seam-gen/icefaces/view/layout/sort.xhtml (rev 0)
+++ trunk/seam-gen/icefaces/view/layout/sort.xhtml 2008-10-11 05:38:57 UTC (rev 9259)
@@ -0,0 +1,11 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+ <s:link id="list#{propertyPath.replace('.','_')}SortId" styleClass="columnHeader" value="#{propertyLabel} #{entityList.orderColumn == propertyPath ? (entityList.orderDirection == 'desc' ? messages.down : messages.up) : ''}">
+ <f:param name="sort" value="#{propertyPath}"/>
+ <f:param name="dir" value="#{entityList.orderColumn == propertyPath and entityList.orderDirection == 'asc' ? 'desc' : 'asc'}"/>
+ </s:link>
+</ui:composition>
Modified: trunk/seam-gen/icefaces/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-11 05:37:34 UTC (rev 9258)
+++ trunk/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-11 05:38:57 UTC (rev 9259)
@@ -87,19 +87,25 @@
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<ice:column id="list${componentProperty.name}Id">
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">
+<#assign propertyPath = property.name + '.' + componentProperty.name>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${componentProperty.name}"/>
+ <ui:param name="propertyPath" value="${propertyPath}"/>
+ </ui:include>
+ </f:facet>
${'#'}{${componentName}.${property.name}.${componentProperty.name}}
</ice:column>
</#foreach>
<#else>
<ice:column id="list${property.name}Id">
<f:facet name="header">
- <s:link styleClass="columnHeader"
- id="list${property.name}LinkId"
- value="${property.name} ${'#'}{${listName}.orderColumn=='${property.name}' ? (${listName}.orderDirection=='desc' ? messages.down : messages.up) : ''}">
- <f:param name="sort" value="${property.name}" />
- <f:param name="dir" value="${'#'}{${listName}.orderDirection=='asc' ? 'desc' : 'asc'}"/>
- </s:link>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${property.name}"/>
+ <ui:param name="propertyPath" value="${property.name}"/>
+ </ui:include>
</f:facet>
${'#'}{${componentName}.${property.name}}&nbsp;
</ice:column>
@@ -112,11 +118,11 @@
<ice:column id="listColumn${componentProperty}${listName}Id">
<f:facet name="header">
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name + '.' + componentProperty.name>
- <s:link styleClass="columnHeader"
- id="listColumnHeader${componentProperty.name}Id"
- value="${property.name} ${componentProperty.name} ${'#'}{${listName}.order=='${propertyPath} asc' ? messages.down : ( ${listName}.order=='${propertyPath} desc' ? messages.up : '' )}">
- <f:param name="order" value="${'#'}{${listName}.order=='${propertyPath} asc' ? '${propertyPath} desc' : '${propertyPath} asc'}"/>
- </s:link>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${property.name} ${componentProperty.name}"/>
+ <ui:param name="propertyPath" value="${propertyPath}"/>
+ </ui:include>
</f:facet>
${'#'}{${componentName}.${propertyPath}}&nbsp;
</ice:column>
@@ -125,11 +131,11 @@
<ice:column id="listColumn${property.name}Id">
<f:facet name="header">
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name>
- <s:link styleClass="columnHeader"
- id="listcolumnHeader${property.name}Id"
- value="${property.name} ${parentPojo.identifierProperty.name} ${'#'}{${listName}.order=='${propertyPath} asc' ? messages.down : ( ${listName}.order=='${propertyPath} desc' ? messages.up : '' )}">
- <f:param name="order" value="${'#'}{${listName}.order=='${propertyPath} asc' ? '${propertyPath} desc' : '${propertyPath} asc'}"/>
- </s:link>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${property.name} ${parentPojo.identifierProperty.name}"/>
+ <ui:param name="propertyPath" value="${propertyPath}"/>
+ </ui:include>
</f:facet>
${'#'}{${componentName}.${propertyPath}}
</ice:column>
Added: trunk/seam-gen/view/layout/sort.xhtml
===================================================================
--- trunk/seam-gen/view/layout/sort.xhtml (rev 0)
+++ trunk/seam-gen/view/layout/sort.xhtml 2008-10-11 05:38:57 UTC (rev 9259)
@@ -0,0 +1,11 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+ <s:link styleClass="columnHeader" value="#{propertyLabel} #{entityList.orderColumn == propertyPath ? (entityList.orderDirection == 'desc' ? messages.down : messages.up) : ''}">
+ <f:param name="sort" value="#{propertyPath}"/>
+ <f:param name="dir" value="#{entityList.orderColumn == propertyPath and entityList.orderDirection == 'asc' ? 'desc' : 'asc'}"/>
+ </s:link>
+</ui:composition>
Modified: trunk/seam-gen/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/list.xhtml.ftl 2008-10-11 05:37:34 UTC (rev 9258)
+++ trunk/seam-gen/view/list.xhtml.ftl 2008-10-11 05:38:57 UTC (rev 9259)
@@ -71,18 +71,25 @@
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<h:column>
- <f:facet name="header">${componentProperty.name}</f:facet>
+ <f:facet name="header">
+<#assign propertyPath = property.name + '.' + componentProperty.name>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${componentProperty.name}"/>
+ <ui:param name="propertyPath" value="${propertyPath}"/>
+ </ui:include>
+ </f:facet>
${'#'}{${componentName}.${property.name}.${componentProperty.name}}
</h:column>
</#foreach>
<#else>
<h:column>
<f:facet name="header">
- <s:link styleClass="columnHeader"
- value="${property.name} ${'#'}{${listName}.orderColumn=='${property.name}' ? (${listName}.orderDirection=='desc' ? messages.down : messages.up) : ''}">
- <f:param name="sort" value="${property.name}" />
- <f:param name="dir" value="${'#'}{${listName}.orderDirection=='asc' ? 'desc' : 'asc'}"/>
- </s:link>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${property.name}"/>
+ <ui:param name="propertyPath" value="${property.name}"/>
+ </ui:include>
</f:facet>
${'#'}{${componentName}.${property.name}}
</h:column>
@@ -95,10 +102,11 @@
<h:column>
<f:facet name="header">
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name + '.' + componentProperty.name>
- <s:link styleClass="columnHeader"
- value="${property.name} ${componentProperty.name} ${'#'}{${listName}.order=='${propertyPath} asc' ? messages.down : ( ${listName}.order=='${propertyPath} desc' ? messages.up : '' )}">
- <f:param name="order" value="${'#'}{${listName}.order=='${propertyPath} asc' ? '${propertyPath} desc' : '${propertyPath} asc'}"/>
- </s:link>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${property.name} ${componentProperty.name}"/>
+ <ui:param name="propertyPath" value="${propertyPath}"/>
+ </ui:include>
</f:facet>
${'#'}{${componentName}.${propertyPath}}
</h:column>
@@ -107,10 +115,11 @@
<h:column>
<f:facet name="header">
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name>
- <s:link styleClass="columnHeader"
- value="${property.name} ${parentPojo.identifierProperty.name} ${'#'}{${listName}.order=='${propertyPath} asc' ? messages.down : ( ${listName}.order=='${propertyPath} desc' ? messages.up : '' )}">
- <f:param name="order" value="${'#'}{${listName}.order=='${propertyPath} asc' ? '${propertyPath} desc' : '${propertyPath} asc'}"/>
- </s:link>
+ <ui:include src="layout/sort.xhtml">
+ <ui:param name="entityList" value="${'#'}{${listName}}"/>
+ <ui:param name="propertyLabel" value="${property.name} ${parentPojo.identifierProperty.name}"/>
+ <ui:param name="propertyPath" value="${propertyPath}"/>
+ </ui:include>
</f:facet>
${'#'}{${componentName}.${propertyPath}}
</h:column>
16 years, 1 month
Seam SVN: r9258 - trunk/src/main/org/jboss/seam/framework.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-11 01:37:34 -0400 (Sat, 11 Oct 2008)
New Revision: 9258
Modified:
trunk/src/main/org/jboss/seam/framework/Query.java
Log:
allow sort column to be a property path (necessary to allow sorting on components and ToOne associations)
Modified: trunk/src/main/org/jboss/seam/framework/Query.java
===================================================================
--- trunk/src/main/org/jboss/seam/framework/Query.java 2008-10-10 19:49:54 UTC (rev 9257)
+++ trunk/src/main/org/jboss/seam/framework/Query.java 2008-10-11 05:37:34 UTC (rev 9258)
@@ -32,7 +32,7 @@
private static final Pattern WHERE_PATTERN = Pattern.compile("\\s(where)\\s", Pattern.CASE_INSENSITIVE);
private static final Pattern ORDER_PATTERN = Pattern.compile("\\s(order)(\\s)+by\\s", Pattern.CASE_INSENSITIVE);
- private static final Pattern ORDER_COLUMN_PATTERN = Pattern.compile("^\\w*$");
+ private static final Pattern ORDER_COLUMN_PATTERN = Pattern.compile("^\\w+(\\.\\w+)*$");
private static final String DIR_ASC = "asc";
private static final String DIR_DESC = "desc";
@@ -411,12 +411,10 @@
*/
public String getOrder() {
- String column = getOrderColumn();
+ String column = getOrderColumn();
if (column == null) {
return order;
-
-
}
String direction = getOrderDirection();
16 years, 1 month
Seam SVN: r9257 - in branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui: util and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-10-10 15:49:54 -0400 (Fri, 10 Oct 2008)
New Revision: 9257
Modified:
branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java
branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java
Log:
revert JBSEAM-3535
Modified: branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java
===================================================================
--- branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java 2008-10-10 19:37:59 UTC (rev 9256)
+++ branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/component/UISeamCommandBase.java 2008-10-10 19:49:54 UTC (rev 9257)
@@ -110,13 +110,10 @@
url.addParameter(uiTaskId);
}
- if (!usedParameters.contains("dataModelSelection"))
+ UISelection uiSelection = getSelection();
+ if (uiSelection != null)
{
- UISelection uiSelection = getSelection();
- if (uiSelection != null)
- {
- url.addParameter(uiSelection);
- }
+ url.addParameter(uiSelection);
}
encodedUrl = url.getEncodedUrl();
Modified: branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java
===================================================================
--- branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java 2008-10-10 19:37:59 UTC (rev 9256)
+++ branches/community/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/util/ViewUrlBuilder.java 2008-10-10 19:49:54 UTC (rev 9257)
@@ -40,7 +40,7 @@
public void addParameter(UIParameter parameter) throws UnsupportedEncodingException
{
String name = parameter.getName();
- if (parameter.getValue() != null && !(name.equals(page.getConversationIdParameter().getParameterName())
+ if (!(name.equals(page.getConversationIdParameter().getParameterName())
&& getParameters().containsKey(name)))
{
super.addParameter(parameter);
@@ -51,4 +51,4 @@
public String getEncodedUrl() {
return FacesContext.getCurrentInstance().getExternalContext().encodeActionURL(super.getEncodedUrl());
}
-}
+}
\ No newline at end of file
16 years, 1 month
Seam SVN: r9256 - trunk/src/excel/org/jboss/seam/excel/css.
by seam-commits@lists.jboss.org
Author: danielc.roth
Date: 2008-10-10 15:37:59 -0400 (Fri, 10 Oct 2008)
New Revision: 9256
Modified:
trunk/src/excel/org/jboss/seam/excel/css/CellStyle.java
Log:
http://www.seamframework.org/Community/UILinkCausesUrlMalformedException
Modified: trunk/src/excel/org/jboss/seam/excel/css/CellStyle.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/css/CellStyle.java 2008-10-10 18:36:19 UTC (rev 9255)
+++ trunk/src/excel/org/jboss/seam/excel/css/CellStyle.java 2008-10-10 19:37:59 UTC (rev 9256)
@@ -77,8 +77,8 @@
font.struckOut = (Boolean) styleMap.get(CSSNames.FONT_STRUCK_OUT);
font.underlineStyle = (String) styleMap.get(CSSNames.FONT_UNDERLINE_STYLE);
font.bold = (Boolean) styleMap.get(CSSNames.FONT_BOLD);
- background.color = (String) styleMap.get(CSSNames.BACKGROUND_PATTERN);
- background.pattern = (String) styleMap.get(CSSNames.BACKGROUND_COLOR);
+ background.color = (String) styleMap.get(CSSNames.BACKGROUND_COLOR);
+ background.pattern = (String) styleMap.get(CSSNames.BACKGROUND_PATTERN);
leftBorder.color = (String) styleMap.get(CSSNames.BORDER_LEFT_COLOR);
leftBorder.lineStyle = (String) styleMap.get(CSSNames.BORDER_LEFT_LINE_STYLE);
topBorder.color = (String) styleMap.get(CSSNames.BORDER_TOP_COLOR);
16 years, 1 month
Seam SVN: r9255 - in trunk/src/main/org/jboss/seam: core and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-10-10 14:36:19 -0400 (Fri, 10 Oct 2008)
New Revision: 9255
Modified:
trunk/src/main/org/jboss/seam/Component.java
trunk/src/main/org/jboss/seam/core/Events.java
Log:
JBSEAM-3506
Modified: trunk/src/main/org/jboss/seam/Component.java
===================================================================
--- trunk/src/main/org/jboss/seam/Component.java 2008-10-10 18:14:55 UTC (rev 9254)
+++ trunk/src/main/org/jboss/seam/Component.java 2008-10-10 18:36:19 UTC (rev 9255)
@@ -1901,8 +1901,13 @@
public static Object getInstance(String name, boolean create)
{
+ return getInstance(name, create, true);
+ }
+
+ public static Object getInstance(String name, boolean create, boolean allowAutocreation)
+ {
Object result = Contexts.lookupInStatefulContexts(name);
- result = getInstance(name, create, result);
+ result = getInstance(name, create, allowAutocreation, result);
return result;
}
@@ -1913,15 +1918,20 @@
public static Object getInstance(String name, ScopeType scope, boolean create)
{
+ return getInstance(name, scope, create, true);
+ }
+
+ public static Object getInstance(String name, ScopeType scope, boolean create, boolean allowAutocreation)
+ {
Object result = scope==STATELESS ? null : scope.getContext().get(name);
- result = getInstance(name, create, result);
+ result = getInstance(name, create, allowAutocreation, result);
return result;
}
- private static Object getInstance(String name, boolean create, Object result) {
+ private static Object getInstance(String name, boolean create, boolean allowAutoCreation, Object result) {
Component component = Component.forName(name);
- create = create || Init.instance().isAutocreateVariable(name);
+ create = create || (Init.instance().isAutocreateVariable(name) && allowAutoCreation);
if (result==null && create)
{
Modified: trunk/src/main/org/jboss/seam/core/Events.java
===================================================================
--- trunk/src/main/org/jboss/seam/core/Events.java 2008-10-10 18:14:55 UTC (rev 9254)
+++ trunk/src/main/org/jboss/seam/core/Events.java 2008-10-10 18:36:19 UTC (rev 9255)
@@ -74,7 +74,7 @@
for (ObserverMethod observer: observers)
{
String name = observer.getComponent().getName();
- Object listener = Component.getInstance( name, observer.isCreate() );
+ Object listener = Component.getInstance( name, observer.isCreate(), false );
if ( observer.getComponent().hasUnwrapMethod() )
{
listener = observer.getComponent().getScope().getContext().get(name);
16 years, 1 month