[jboss-cvs] jboss-seam/seam-gen/view ...
Gavin King
gavin.king at jboss.com
Sat Dec 16 08:26:10 EST 2006
User: gavin
Date: 06/12/16 08:26:10
Modified: seam-gen/view edit.xhtml.ftl list.page.xml.ftl
list.xhtml.ftl view.xhtml.ftl
Log:
JBSEAM-477, search screens
Revision Changes Path
1.21 +2 -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.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- edit.xhtml.ftl 10 Dec 2006 16:53:28 -0000 1.20
+++ edit.xhtml.ftl 16 Dec 2006 13:26:10 -0000 1.21
@@ -189,7 +189,7 @@
<div class="association" id="${property.name}">
- <h2>${property.name}</h2>
+ <h3>${property.name}</h3>
<h:outputText value="No ${property.name}"
rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
@@ -234,7 +234,7 @@
<div class="association" id="${property.name}">
- <h2>${property.name}</h2>
+ <h3>${property.name}</h3>
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
1.3 +7 -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.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- list.page.xml.ftl 16 Dec 2006 11:37:52 -0000 1.2
+++ list.page.xml.ftl 16 Dec 2006 13:26:10 -0000 1.3
@@ -8,4 +8,11 @@
<page>
<param name="firstResult" value="${'#'}{${listName}.firstResult}"/>
<param name="order" value="${'#'}{${listName}.order}"/>
+<#foreach property in pojo.allPropertiesIterator>
+<#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
+<#if property.value.typeName == "string">
+ <param name="${property.name}" value="${'#'}{${listName}.${componentName}.${property.name}}"/>
+</#if>
+</#if>
+</#foreach>
</page>
\ No newline at end of file
1.9 +39 -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.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- list.xhtml.ftl 16 Dec 2006 11:37:52 -0000 1.8
+++ list.xhtml.ftl 16 Dec 2006 13:26:10 -0000 1.9
@@ -12,15 +12,46 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
template="layout/template.xhtml">
<ui:define name="body">
- <h1>${entityName} list</h1>
- <p>Generated list page</p>
+ <h1>${entityName} search</h1>
+ <p>Generated search page</p>
<h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
+ <h:form id="${componentName}" styleClass="edit">
+
+ <div class="dialog">
+ <table>
+<#foreach property in pojo.allPropertiesIterator>
+<#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
+<#if property.value.typeName == "string">
+ <tr class="prop">
+ <td class="name">${property.name}</td>
+ <td class="value">
+ <h:inputText id="${property.name}"
+ value="${'#'}{${listName}.${componentName}.${property.name}}"/>
+ </td>
+ </tr>
+</#if>
+</#if>
+</#foreach>
+ </table>
+ </div>
+
+ <div class="actionButtons">
+ <h:commandButton id="search" value="Search" action="/${listPageName}.xhtml"/>
+ </div>
+
+ </h:form>
+
+ <div class="results" id="${componentName}List">
+
+ <h3>search results</h3>
+
<h:outputText value="No ${componentName} exists"
rendered="${'#'}{empty ${listName}.resultList}"/>
@@ -32,7 +63,8 @@
<#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
<h:column>
<f:facet name="header">
- <s:link value="${property.name} ${'#'}{${listName}.order=='${property.name} asc' ? messages.down : ( ${listName}.order=='${property.name} desc' ? messages.up : '' )}" styleClass="columnHeader">
+ <s:link styleClass="columnHeader"
+ value="${property.name} ${'#'}{${listName}.order=='${property.name} asc' ? messages.down : ( ${listName}.order=='${property.name} desc' ? messages.up : '' )}">
<f:param name="order" value="${'#'}{${listName}.order=='${property.name} asc' ? '${property.name} desc' : '${property.name} asc'}"/>
</s:link>
</f:facet>
@@ -44,7 +76,8 @@
<h:column>
<f:facet name="header">
<#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name>
- <s:link value="${property.name} ${parentPojo.identifierProperty.name} ${'#'}{${listName}.order=='${propertyPath} asc' ? messages.down : ( ${listName}.order=='${propertyPath} desc' ? messages.up : '' )}" styleClass="columnHeader">
+ <s:link styleClass="columnHeader"
+ value="${property.name} ${parentPojo.identifierProperty.name} ${'#'}{${listName}.order=='${propertyPath} asc' ? messages.down : ( ${listName}.order=='${propertyPath} desc' ? messages.up : '' )}">
<f:param name="order" value="${'#'}{${listName}.order=='${propertyPath} asc' ? '${propertyPath} desc' : '${propertyPath} asc'}"/>
</s:link>
</f:facet>
@@ -63,6 +96,8 @@
</h:column>
</h:dataTable>
+ </div>
+
<div class="tableControl">
<s:link view="/${listPageName}.xhtml"
1.8 +2 -2 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.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- view.xhtml.ftl 10 Dec 2006 15:42:02 -0000 1.7
+++ view.xhtml.ftl 16 Dec 2006 13:26:10 -0000 1.8
@@ -81,7 +81,7 @@
<div class="association" id="${property.name}">
- <h2>${property.name}</h2>
+ <h3>${property.name}</h3>
<h:outputText value="No ${property.name}"
rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
@@ -123,7 +123,7 @@
<div class="association" id="${property.name}">
- <h2>${property.name}</h2>
+ <h3>${property.name}</h3>
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
More information about the jboss-cvs-commits
mailing list