[jboss-cvs] jboss-seam/seam-gen/view ...
Gavin King
gavin.king at jboss.com
Wed Mar 14 12:09:52 EDT 2007
User: gavin
Date: 07/03/14 12:09:52
Modified: seam-gen/view edit.xhtml.ftl view.xhtml.ftl
Log:
fix bug with no associations
Revision Changes Path
1.44 +13 -2 jboss-seam/seam-gen/view/edit.xhtml.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: edit.xhtml.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/view/edit.xhtml.ftl,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- edit.xhtml.ftl 14 Mar 2007 04:22:37 -0000 1.43
+++ edit.xhtml.ftl 14 Mar 2007 16:09:52 -0000 1.44
@@ -70,7 +70,16 @@
</div>
</h:form>
- <rich:tabPanel switchType="ajax">
+<#assign hasAssociations=false>
+<#foreach property in pojo.allPropertiesIterator>
+<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#assign hasAssociations=true>
+</#if>
+</#foreach>
+
+<#if hasAssociations>
+<rich:tabPanel switchType="ajax">
+</#if>
<#foreach property in pojo.allPropertiesIterator>
<#if c2h.isManyToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
@@ -227,7 +236,9 @@
</rich:tab>
</#if>
</#foreach>
- </rich:tabPanel>
+<#if hasAssociations>
+</rich:tabPanel>
+</#if>
</ui:define>
</ui:composition>
1.19 +12 -1 jboss-seam/seam-gen/view/view.xhtml.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: view.xhtml.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/view/view.xhtml.ftl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- view.xhtml.ftl 9 Mar 2007 23:55:07 -0000 1.18
+++ view.xhtml.ftl 14 Mar 2007 16:09:52 -0000 1.19
@@ -45,7 +45,16 @@
</div>
+<#assign hasAssociations=false>
+<#foreach property in pojo.allPropertiesIterator>
+<#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
+<#assign hasAssociations=true>
+</#if>
+</#foreach>
+
+<#if hasAssociations>
<rich:tabPanel switchType="ajax">
+</#if>
<#foreach property in pojo.allPropertiesIterator>
<#if c2h.isManyToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
@@ -185,7 +194,9 @@
</rich:tab>
</#if>
</#foreach>
+<#if hasAssociations>
</rich:tabPanel>
+</#if>
</ui:define>
</ui:composition>
More information about the jboss-cvs-commits
mailing list