[seam-commits] Seam SVN: r9398 - in branches/enterprise/JBPAPP_4_3_FP01: seam-gen/icefaces/view and 3 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Oct 23 13:41:32 EDT 2008
Author: manaRH
Date: 2008-10-23 13:41:31 -0400 (Thu, 23 Oct 2008)
New Revision: 9398
Modified:
branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl
branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.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/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.xhtml.ftl
branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java
Log:
JBPAPP-1310
Modified: branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/build/gen.pom.xml 2008-10-23 17:41:31 UTC (rev 9398)
@@ -23,6 +23,12 @@
<dependency>
<groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<scope>runtime</scope>
</dependency>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/edit.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -75,7 +75,7 @@
</ice:form>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -85,7 +85,7 @@
<ice:panelTabSet id="editPanelTab${homeName}Id" styleClass="componentPanelTabSetLayout" style="margin-bottom:5px;margin-top:10px;">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -106,7 +106,7 @@
columnClasses="allCols"
id="edit${property.name}TableId">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<ice:column id="editColumn${componentProperty.name}Id">
@@ -121,7 +121,7 @@
</ice:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -187,7 +187,7 @@
columnClasses="allCols"
id="edit${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<ice:column id="edit${componentProperty.name}Id">
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,6 +1,6 @@
<#include "../util/TypeInfo.ftl">
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#assign propertyIsId = property.equals(pojo.identifierProperty)>
<#if !propertyIsId || property.value.identifierGeneratorStrategy == "assigned">
<#if pojo.isComponent(property)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.page.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -17,7 +17,7 @@
<param name="order" value="${'#'}{${listName}.order}"/>
<param name="from"/>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.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/icefaces/view/list.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -33,7 +33,7 @@
<ice:panelGroup id="listPanelGroup${entityName}Id" styleClass="edit">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
@@ -85,7 +85,7 @@
columnClasses="allCols"
rendered="${'#'}{not empty ${listName}.resultList}">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<ice:column id="list${componentProperty.name}Id">
@@ -106,7 +106,7 @@
</ice:column>
</#if>
</#if>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/param.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,5 +1,5 @@
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if entities.add(parentPojo.shortName)>
<#assign parentComponentName = util.lower(parentPojo.shortName)>
Modified: branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/icefaces/view/view.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -28,7 +28,7 @@
</table>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#include "viewproperty.xhtml.ftl">
</#if>
</#foreach>
@@ -51,7 +51,7 @@
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -63,7 +63,7 @@
style="margin-bottom:5px;margin-top:10px;">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -82,7 +82,7 @@
columnClasses="allCols"
id="view${property.name}TableId">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<ice:column id="viewColumn${componentProperty.name}Id">
@@ -97,7 +97,7 @@
</ice:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -156,7 +156,7 @@
columnClasses="allCols"
id="view${property.name}TableId">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<ice:column id="view${componentProperty.name}Id">
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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityHome.java.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -8,7 +8,7 @@
{
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentHomeName = util.lower(parentPojo.shortName) + "Home">
@${pojo.importType("org.jboss.seam.annotations.In")}(create=true)
@@ -70,7 +70,7 @@
{
getInstance();
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.shortName!=pojo.shortName>
<#assign parentHomeName = util.lower(parentPojo.shortName) + "Home">
@@ -88,7 +88,7 @@
public boolean isWired()
{
<#foreach property in pojo.allPropertiesIterator>
-<#if (c2h.isManyToOne(property) && !property.optional)>
+<#if (util.isToOne(property) && !property.optional)>
<#assign getter = pojo.getGetterSignature(property)>
if ( getInstance().${getter}()==null ) return false;
</#if>
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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/src/EntityList.java.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -18,7 +18,7 @@
private static final String[] RESTRICTIONS = {
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
+<#if !c2h.isCollection(property) && !util.isToOne(property)>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/edit.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -69,7 +69,7 @@
</h:form>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -78,7 +78,7 @@
<rich:tabPanel switchType="ajax">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -99,7 +99,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
@@ -114,7 +114,7 @@
</h:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -180,7 +180,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<h:column>
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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/editproperty.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,6 +1,6 @@
<#include "../util/TypeInfo.ftl">
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#assign propertyIsId = property.equals(pojo.identifierProperty)>
<#if !propertyIsId || property.value.identifierGeneratorStrategy == "assigned">
<#if pojo.isComponent(property)>
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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.page.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -11,7 +11,7 @@
<param name="order" value="${'#'}{${listName}.order}"/>
<param name="from"/>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/list.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -26,7 +26,7 @@
<rich:simpleTogglePanel label="${entityName} search parameters" switchType="ajax">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
@@ -69,7 +69,7 @@
value="${'#'}{${listName}.resultList}"
rendered="${'#'}{not empty ${listName}.resultList}">
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#if pojo.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<h:column>
@@ -89,7 +89,7 @@
</h:column>
</#if>
</#if>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if parentPojo.isComponent(parentPojo.identifierProperty)>
<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/param.xml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -1,5 +1,5 @@
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#if entities.add(parentPojo.shortName)>
<#assign parentComponentName = util.lower(parentPojo.shortName)>
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-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/seam-gen/view/view.xhtml.ftl 2008-10-23 17:41:31 UTC (rev 9398)
@@ -21,7 +21,7 @@
<rich:panel>
<f:facet name="header">${entityName}</f:facet>
<#foreach property in pojo.allPropertiesIterator>
-<#if !c2h.isCollection(property) && !c2h.isManyToOne(property) && property != pojo.versionProperty!>
+<#if !c2h.isCollection(property) && !util.isToOne(property) && property != pojo.versionProperty!>
<#include "viewproperty.xhtml.ftl">
</#if>
</#foreach>
@@ -43,7 +43,7 @@
</div>
<#assign hasAssociations=false>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#if util.isToOne(property) || c2h.isOneToManyCollection(property)>
<#assign hasAssociations=true>
</#if>
</#foreach>
@@ -52,7 +52,7 @@
<rich:tabPanel switchType="ajax">
</#if>
<#foreach property in pojo.allPropertiesIterator>
-<#if c2h.isManyToOne(property)>
+<#if util.isToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
@@ -69,7 +69,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach parentProperty in parentPojo.allPropertiesIterator>
-<#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
+<#if !c2h.isCollection(parentProperty) && !util.isToOne(parentProperty) && parentProperty != parentPojo.versionProperty!>
<#if parentPojo.isComponent(parentProperty)>
<#foreach componentProperty in parentProperty.value.propertyIterator>
<h:column>
@@ -84,7 +84,7 @@
</h:column>
</#if>
</#if>
-<#if c2h.isManyToOne(parentProperty)>
+<#if util.isToOne(parentProperty)>
<#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
<#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
<#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
@@ -141,7 +141,7 @@
rowClasses="rvgRowOne,rvgRowTwo"
id="${property.name}Table">
<#foreach childProperty in childPojo.allPropertiesIterator>
-<#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty) && childProperty != childPojo.versionProperty!>
+<#if !c2h.isCollection(childProperty) && !util.isToOne(childProperty) && childProperty != childPojo.versionProperty!>
<#if childPojo.isComponent(childProperty)>
<#foreach componentProperty in childProperty.value.propertyIterator>
<h:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java 2008-10-23 17:21:16 UTC (rev 9397)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/gen/org/jboss/seam/tool/Util.java 2008-10-23 17:41:31 UTC (rev 9398)
@@ -3,12 +3,19 @@
import java.util.HashSet;
import java.util.Set;
+import org.hibernate.mapping.Property;
+import org.hibernate.mapping.ToOne;
+
public class Util
{
public String lower(String name)
{
return name.substring(0, 1).toLowerCase() + name.substring(1);
}
+ public boolean isToOne(Property property)
+ {
+ return (property.getValue() != null) && (property.getValue() instanceof ToOne);
+ }
public String upper(String name)
{
return name.substring(0, 1).toUpperCase() + name.substring(1);
More information about the seam-commits
mailing list