[seam-commits] Seam SVN: r9700 - in branches/enterprise/JBPAPP_4_3_FP01/seam-gen: util and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Dec 3 10:31:33 EST 2008


Author: manaRH
Date: 2008-12-03 10:31:33 -0500 (Wed, 03 Dec 2008)
New Revision: 9700

Modified:
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/util/TypeInfo.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.page.xml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/error.xhtml
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.page.xml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/viewproperty.xhtml.ftl
Log:
JBPAPP-1466

Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -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};
 
@@ -18,7 +18,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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/util/TypeInfo.ftl
===================================================================
(Binary files differ)

Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.page.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.page.xml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.page.xml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -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>
@@ -69,7 +69,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>
@@ -78,73 +78,73 @@
 <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">
     
         <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"
                       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>
-                ${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
+                <f:facet name="header">${label(componentProperty.name)}</f:facet>
+                <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${componentProperty.name}}" indent=16/>
             </h:column>
 </#foreach>
 <#else>
             <h:column>
-                <f:facet name="header">${parentProperty.name}</f:facet>
-                ${'#'}{${parentName}.${parentProperty.name}}
+                <f:facet name="header">${label(parentProperty.name)}</f:facet>
+                <@outputValue property=parentProperty expression="${'#'}{_${parentName}.${parentProperty.name}}" indent=16/>
             </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>
-		    	${'#'}{${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">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</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>
 </#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)}" 
-                            value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${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)}" 
-                           value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
+                    <f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}" 
+                           value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}}"/>
 </#if>
                 </s:link>
             </h:column>
@@ -164,59 +164,59 @@
 </#if>
 <#if c2h.isOneToManyCollection(property)>
 
-    <rich:tab label="${property.name}">
-        <div class="association" id="${property.name}Children">
+    <rich:tab label="${label(property.name)}">
+        <h:form styleClass="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}}"/>
         
             <rich:dataTable value="${'#'}{${homeName}.${property.name}}" 
-                           var="${childName}" 
+                           var="_${childName}" 
                       rendered="${'#'}{not empty ${homeName}.${property.name}}" 
                     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>
-                    ${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
-                </h:column>
+                <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}">
+                    <f:facet name="header">${label(componentProperty.name)}</f:facet>
+                    <@outputValue property=componentProperty expression="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}" indent=20/>
+                </rich:column>
 </#foreach>
 <#else>
-                <h:column>
-                    <f:facet name="header">${childProperty.name}</f:facet>
-                    <h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
-                </h:column>
+                <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}}">
+                    <f:facet name="header">${label(childProperty.name)}</f:facet>
+                    <@outputValue property=childProperty expression="${'#'}{_${childName}.${childProperty.name}}" indent=20/>
+                </rich: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="Select"
                      propagation="none">
 <#if childPojo.isComponent(childPojo.identifierProperty)>
 <#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
-                        <f:param name="${childName}${util.upper(componentProperty.name)}" 
-                                value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${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)}" 
-                                value="${'#'}{${childName}.${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}"/>
                     </s:link>
                 </h:column>
             </rich:dataTable>
         
-        </div>
+        </h:form>
           
         <f:subview rendered="${'#'}{${homeName}.managed}" id="${property.name}">
         <div class="actionButtons">
@@ -224,7 +224,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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -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)>
 				<rich:calendar id="${componentProperty.name}"
 <#if propertyIsId>
@@ -123,7 +123,7 @@
 <#assign property = property.value.typeName>
 
             <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)>
 				<rich:calendar id="${property.name}" 
 <#if propertyIsId>

Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/error.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/error.xhtml	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/error.xhtml	2008-12-03 15:31:33 UTC (rev 9700)
@@ -7,12 +7,13 @@
                 xmlns:h="http://java.sun.com/jsf/html"
                 template="layout/template.xhtml">
 
+<ui:param name="showGlobalMessages" value="false"/>
 <ui:define name="body">
 
     <h1>Error</h1>
     <p>Something bad happened :-(</p>
     
-    <h:messages styleClass="message"/>
+    <h:messages id="errorMessage" styleClass="message"/>
         
 </ui:define> 
 </ui:composition>

Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -5,13 +5,13 @@
       
 <#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="order" value="${'#'}{${listName}.order}"/>
    <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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -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">
@@ -26,12 +26,12 @@
         <rich:simpleTogglePanel label="${entityName} search parameters" 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>
 
@@ -40,7 +40,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>
 
@@ -65,16 +65,16 @@
                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>
-<#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>
             <f:facet name="header">${componentProperty.name}</f:facet>
-            ${'#'}{${componentName}.${property.name}.${componentProperty.name}}
+            <@outputValue property=componentProperty expression="${'#'}{_${componentName}.${property.name}.${componentProperty.name}}" indent=12/>
         </h:column>
 </#foreach>
 <#else>
@@ -85,11 +85,11 @@
                     <f:param name="order" value="${'#'}{${listName}.order=='${property.name} asc' ? '${property.name} desc' : '${property.name} asc'}"/>
                 </s:link>
             </f:facet>
-            ${'#'}{${componentName}.${property.name}}
+            <@outputValue property=property expression="${'#'}{_${componentName}.${property.name}}" indent=12/>
         </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>
@@ -101,7 +101,7 @@
                     <f:param name="order" value="${'#'}{${listName}.order=='${propertyPath} asc' ? '${propertyPath} desc' : '${propertyPath} asc'}"/>
                 </s:link>
             </f:facet>
-            ${'#'}{${componentName}.${propertyPath}}
+            @outputValue property=componentProperty expression="${'#'}{_${componentName}.${propertyPath}}" indent=12/>
         </h:column>
 </#foreach>
 <#else>
@@ -113,24 +113,24 @@
                     <f:param name="order" value="${'#'}{${listName}.order=='${propertyPath} asc' ? '${propertyPath} desc' : '${propertyPath} asc'}"/>
                 </s:link>
             </f:facet>
-            ${'#'}{${componentName}.${propertyPath}}
+            <@outputValue property=parentPojo.identifierProperty expression="${'#'}{_${componentName}.${propertyPath}}" indent=12/>
         </h:column>
 </#if>
 </#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="Select" 
                       id="${componentName}">
 <#if pojo.isComponent(pojo.identifierProperty)>
 <#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
-                <f:param name="${componentName}${util.upper(componentProperty.name)}" 
-                        value="${'#'}{${componentName}.${pojo.identifierProperty.name}.${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)}" 
-                        value="${'#'}{${componentName}.${pojo.identifierProperty.name}}"/>
+                <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}" 
+                        value="${'#'}{_${componentName}.${pojo.identifierProperty.name}}"/>
 </#if>
             </s:link>
         </h:column>
@@ -178,10 +178,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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.page.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.page.xml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.page.xml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -4,13 +4,13 @@
       xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -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">
@@ -21,7 +22,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>
@@ -43,7 +44,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>
@@ -52,68 +53,68 @@
     <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}." 
                    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"
                       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>
-                ${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
+                <f:facet name="header">${label(componentProperty.name)}</f:facet>
+                <@outputValue property=componentProperty expression="${'#'}{_${parentName}.${parentProperty.name}.${componentProperty.name}}" indent=16/>
             </h:column>
 </#foreach>
 <#else>
             <h:column>
-                <f:facet name="header">${parentProperty.name}</f:facet>
-                ${'#'}{${parentName}.${parentProperty.name}}
+                <f:facet name="header">${label(parentProperty.name)}</f:facet>
+                <@outputValue property=parentProperty expression="${'#'}{_${parentName}.${parentProperty.name}}" indent=16/>
             </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>
-		    	${'#'}{${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">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</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>
 </#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)}" 
-                            value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${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)}" 
-                           value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
+                    <f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}" 
+                           value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}}"/>
 </#if>
                 </s:link>
             </h:column>
@@ -124,65 +125,65 @@
 </#if>
 <#if c2h.isOneToManyCollection(property)>
 
-    <rich:tab label="${property.name}">
-    <div class="association" id="${property.name}Children">
+    <rich:tab label="${label(property.name)}">
+    <h:form styleClass="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}}"/>
         
         <rich:dataTable value="${'#'}{${homeName}.${property.name}}" 
-                       var="${childName}" 
+                       var="_${childName}" 
                   rendered="${'#'}{not empty ${homeName}.${property.name}}" 
                 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>
-                ${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
-            </h:column>
+            <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}">
+                <f:facet name="header">${label(componentProperty.name)}</f:facet>
+                <@outputValue property=childProperty expression="${'#'}{_${childName}.${childProperty.name}}" indent=16/>
+            </rich:column>
 </#foreach>
 <#else>
-            <h:column>
-                <f:facet name="header">${childProperty.name}</f:facet>
-                <h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
-            </h:column>
+            <rich:column sortBy="${'#'}{_${childName}.${childProperty.name}}">
+                <f:facet name="header">${label(childProperty.name)}</f:facet>
+                <@outputValue property=childProperty expression="${'#'}{_${childName}.${childProperty.name}}" indent=16/>
+            </rich: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)}" 
-                            value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${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)}" 
-                            value="${'#'}{${childName}.${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}"/>
                 </s:link>
             </h:column>
         </rich:dataTable>
         
-    </div>
+    </h:form>
     
     <div class="actionButtons">
         <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: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/viewproperty.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/viewproperty.xhtml.ftl	2008-12-03 09:03:13 UTC (rev 9699)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/viewproperty.xhtml.ftl	2008-12-03 15:31:33 UTC (rev 9700)
@@ -5,59 +5,15 @@
 <#foreach componentProperty in property.value.propertyIterator>
 
         <s:decorate id="${componentProperty.name}" template="layout/display.xhtml">
-            <ui:define name="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>
+			<ui:define name="label">${label(componentProperty.name)}</ui:define>
+            <@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">${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>
+            <ui:define name="label">${label(property.name)}</ui:define>
+			<@outputValue property=property expression="${'#'}{${homeName}.instance.${property.name}}" indent=12/>
         </s:decorate>
 </#if>
 </#if>




More information about the seam-commits mailing list