[jboss-cvs] jboss-seam/seam-gen/view ...
Gavin King
gavin.king at jboss.com
Fri Feb 9 23:19:36 EST 2007
User: gavin
Date: 07/02/09 23:19:36
Modified: seam-gen/view edit.page.xml.ftl edit.xhtml.ftl
list.page.xml.ftl list.xhtml.ftl
Log:
association wiring
Revision Changes Path
1.10 +4 -1 jboss-seam/seam-gen/view/edit.page.xml.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: edit.page.xml.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/view/edit.page.xml.ftl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- edit.page.xml.ftl 10 Feb 2007 02:04:37 -0000 1.9
+++ edit.page.xml.ftl 10 Feb 2007 04:19:36 -0000 1.10
@@ -10,7 +10,9 @@
<page no-conversation-view-id="/${masterPageName}.xhtml">
<restrict>${'#'}{identity.loggedIn}</restrict>
- <begin-conversation if="${'#'}{${homeName}.managed}"/>
+ <begin-conversation join="true"/>
+
+ <action execute="${'#'}{${homeName}.wire}"/>
<param name="${componentName}From"/>
<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
@@ -25,6 +27,7 @@
<#include "param.xml.ftl">
<navigation from-action="${'#'}{${homeName}.persist}">
+ <end-conversation/>
<redirect view-id="/${pageName}.xhtml"/>
</navigation>
1.31 +9 -3 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.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- edit.xhtml.ftl 10 Feb 2007 02:17:19 -0000 1.30
+++ edit.xhtml.ftl 10 Feb 2007 04:19:36 -0000 1.31
@@ -38,6 +38,7 @@
<h:commandButton id="save"
value="Save"
action="${'#'}{${homeName}.persist}"
+ disabled="${'#'}{!${homeName}.wired}"
rendered="${'#'}{!${homeName}.managed}"/>
<h:commandButton id="update"
@@ -58,6 +59,7 @@
<s:button id="cancel"
value="Cancel"
+ propagation="end"
view="/${'#'}{empty ${componentName}From ? '${masterPageName}' : ${componentName}From}.xhtml"
rendered="${'#'}{!${homeName}.managed}"/>
@@ -74,9 +76,6 @@
<h3>${property.name}</h3>
- <h:outputText value="No ${property.name}"
- rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
-
<h:dataTable var="${parentName}"
value="${'#'}{${homeName}.instance.${property.name}}"
rendered="${'#'}{${homeName}.instance.${property.name} != null}"
@@ -125,6 +124,13 @@
</h:column>
</h:dataTable>
+ <div class="actionButtons">
+ <s:button value="Select ${property.name}"
+ view="/${parentPageName}List.xhtml">
+ <f:param name="from" value="${pageName}Edit"/>
+ </s:button>
+ </div>
+
</div>
</#if>
<#if c2h.isOneToManyCollection(property)>
1.5 +1 -0 jboss-seam/seam-gen/view/list.page.xml.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: list.page.xml.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/view/list.page.xml.ftl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- list.page.xml.ftl 9 Feb 2007 22:49:37 -0000 1.4
+++ list.page.xml.ftl 10 Feb 2007 04:19:36 -0000 1.5
@@ -8,6 +8,7 @@
<page>
<param name="firstResult" value="${'#'}{${listName}.firstResult}"/>
<param name="order" value="${'#'}{${listName}.order}"/>
+ <param name="from"/>
<#foreach property in pojo.allPropertiesIterator>
<#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
<#if c2j.isComponent(property)>
1.14 +14 -4 jboss-seam/seam-gen/view/list.xhtml.ftl
(In the diff below, changes in quantity of whitespace are not shown.)
Index: list.xhtml.ftl
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/view/list.xhtml.ftl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- list.xhtml.ftl 9 Feb 2007 22:49:37 -0000 1.13
+++ list.xhtml.ftl 10 Feb 2007 04:19:36 -0000 1.14
@@ -109,7 +109,7 @@
</#foreach>
<h:column>
<f:facet name="header">action</f:facet>
- <s:link view="/${pageName}.xhtml"
+ <s:link view="/${'#'}{empty from ? '${pageName}' : from}.xhtml"
value="Select"
id="${componentName}">
<#if pojo.isComponent(pojo.identifierProperty)>
@@ -162,11 +162,21 @@
</div>
- <div class="actionButtons">
+ <s:div styleClass="actionButtons" rendered="${'#'}{empty from}">
<s:button view="/${editPageName}.xhtml"
id="create"
- value="Create ${componentName}"/>
- </div>
+ value="Create ${componentName}">
+<#assign idName = componentName + util.upper(pojo.identifierProperty.name)>
+<#if c2j.isComponent(pojo.identifierProperty)>
+<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
+<#assign cidName = componentName + util.upper(componentProperty.name)>
+ <f:param name="${cidName}"/>
+</#foreach>
+<#else>
+ <f:param name="${idName}"/>
+</#if>
+ </s:button>
+ </s:div>
</ui:define>
More information about the jboss-cvs-commits
mailing list