[seam-commits] Seam SVN: r9736 - in branches/enterprise/JBPAPP_4_3_FP01/seam-gen: view and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Dec 4 16:14:07 EST 2008


Author: manaRH
Date: 2008-12-04 16:14:07 -0500 (Thu, 04 Dec 2008)
New Revision: 9736

Modified:
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl
   branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl
Log:
JBPAPP-1469, JBPAPP-1466

Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl	2008-12-04 19:54:23 UTC (rev 9735)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl	2008-12-04 21:14:07 UTC (rev 9736)
@@ -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>
@@ -37,7 +38,7 @@
     {
         set${idName}( new ${entityName}Id() );
     }
-    
+
     @Override
     public boolean isIdDefined()
     {
@@ -51,7 +52,6 @@
         if ( get${idName}().${getter}()==0 ) return false;
 </#if>
 </#foreach>
-        
         return true;
     }
 
@@ -65,15 +65,15 @@
 </#if>
         return ${componentName};
     }
-    
+
     public void wire()
     {
         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 )
@@ -84,29 +84,29 @@
 </#if>
 </#foreach>
     }
-    
+
     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>
 </#foreach>
         return true;
     }
-    
+
     public ${entityName} getDefinedInstance()
     {
         return isIdDefined() ? getInstance() : null;
     }
- 	
+
 <#foreach property in pojo.allPropertiesIterator>
 <#assign getter = pojo.getGetterSignature(property)>
 <#if c2h.isOneToManyCollection(property)>
 <#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
     public ${pojo.importType("java.util.List")}<${childPojo.shortName}> ${getter}() {
-        return getInstance() == null ? 
+        return getInstance() == null ?
             null : new ${pojo.importType("java.util.ArrayList")}<${childPojo.shortName}>( getInstance().${getter}() );
     }
 </#if>

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-04 19:54:23 UTC (rev 9735)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl	2008-12-04 21:14:07 UTC (rev 9736)
@@ -147,7 +147,7 @@
 <#foreach componentProperty in childProperty.value.propertyIterator>
             <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/>
+                <@outputValue property=componentProperty expression="${'#'}{_${childName}.${childProperty.name}.${componentProperty.name}}" indent=16/>
             </rich:column>
 </#foreach>
 <#else>




More information about the seam-commits mailing list