[seam-commits] Seam SVN: r9056 - in branches/community/Seam_2_0: seam-gen/icefaces/view and 3 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Sat Sep 20 22:59:33 EDT 2008
Author: dan.j.allen
Date: 2008-09-20 22:59:33 -0400 (Sat, 20 Sep 2008)
New Revision: 9056
Modified:
branches/community/Seam_2_0/build/gen.pom.xml
branches/community/Seam_2_0/seam-gen/icefaces/view/edit.xhtml.ftl
branches/community/Seam_2_0/seam-gen/icefaces/view/editproperty.xhtml.ftl
branches/community/Seam_2_0/seam-gen/icefaces/view/list.page.xml.ftl
branches/community/Seam_2_0/seam-gen/icefaces/view/list.xhtml.ftl
branches/community/Seam_2_0/seam-gen/icefaces/view/param.xml.ftl
branches/community/Seam_2_0/seam-gen/icefaces/view/view.xhtml.ftl
branches/community/Seam_2_0/seam-gen/src/EntityHome.java.ftl
branches/community/Seam_2_0/seam-gen/src/EntityList.java.ftl
branches/community/Seam_2_0/seam-gen/view/edit.xhtml.ftl
branches/community/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl
branches/community/Seam_2_0/seam-gen/view/list.page.xml.ftl
branches/community/Seam_2_0/seam-gen/view/list.xhtml.ftl
branches/community/Seam_2_0/seam-gen/view/param.xml.ftl
branches/community/Seam_2_0/seam-gen/view/view.xhtml.ftl
branches/community/Seam_2_0/src/gen/org/jboss/seam/tool/Util.java
Log:
JBSEAM-2348
Modified: branches/community/Seam_2_0/build/gen.pom.xml
===================================================================
--- branches/community/Seam_2_0/build/gen.pom.xml 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/build/gen.pom.xml 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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>
@@ -66,4 +72,4 @@
</dependencies>
-</project>
\ No newline at end of file
+</project>
Modified: branches/community/Seam_2_0/seam-gen/icefaces/view/edit.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/icefaces/view/edit.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/icefaces/view/edit.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/icefaces/view/editproperty.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/icefaces/view/editproperty.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/icefaces/view/list.page.xml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/icefaces/view/list.page.xml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/icefaces/view/list.page.xml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/icefaces/view/list.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/icefaces/view/list.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/icefaces/view/list.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/icefaces/view/param.xml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/icefaces/view/param.xml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/icefaces/view/param.xml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/icefaces/view/view.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/icefaces/view/view.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/icefaces/view/view.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/src/EntityHome.java.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/src/EntityHome.java.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/src/EntityHome.java.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/src/EntityList.java.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/src/EntityList.java.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/src/EntityList.java.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/view/edit.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/view/edit.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/view/edit.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/view/editproperty.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/view/list.page.xml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/view/list.page.xml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/view/list.page.xml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/view/list.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/view/list.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/view/list.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/view/param.xml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/view/param.xml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/view/param.xml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/seam-gen/view/view.xhtml.ftl
===================================================================
--- branches/community/Seam_2_0/seam-gen/view/view.xhtml.ftl 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/seam-gen/view/view.xhtml.ftl 2008-09-21 02:59:33 UTC (rev 9056)
@@ -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/community/Seam_2_0/src/gen/org/jboss/seam/tool/Util.java
===================================================================
--- branches/community/Seam_2_0/src/gen/org/jboss/seam/tool/Util.java 2008-09-21 01:19:48 UTC (rev 9055)
+++ branches/community/Seam_2_0/src/gen/org/jboss/seam/tool/Util.java 2008-09-21 02:59:33 UTC (rev 9056)
@@ -3,6 +3,9 @@
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)
@@ -17,4 +20,8 @@
{
return new HashSet();
}
+ public boolean isToOne(Property property)
+ {
+ return (property.getValue() != null) && (property.getValue() instanceof ToOne);
+ }
}
More information about the seam-commits
mailing list