[seam-commits] Seam SVN: r9337 - in trunk/seam-gen: view and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Oct 15 05:00:54 EDT 2008
Author: dan.j.allen
Date: 2008-10-15 05:00:53 -0400 (Wed, 15 Oct 2008)
New Revision: 9337
Modified:
trunk/seam-gen/icefaces/view/list.xhtml.ftl
trunk/seam-gen/view/list.xhtml.ftl
trunk/seam-gen/view/stylesheet/theme.css
Log:
add Edit link to list page
add Reset button to search form
Modified: trunk/seam-gen/icefaces/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-15 08:59:59 UTC (rev 9336)
+++ trunk/seam-gen/icefaces/view/list.xhtml.ftl 2008-10-15 09:00:53 UTC (rev 9337)
@@ -145,8 +145,8 @@
<ice:column id="listColumn${pageName}Id">
<f:facet name="header">Action</f:facet>
<s:link view="/${'#'}{empty from ? '${pageName}' : from}.xhtml"
- value="Select"
- id="list${componentName}LinkId">
+ value="${'#'}{empty from ? 'View' : 'Select'}"
+ id="list${componentName}ViewId">
<#if pojo.isComponent(pojo.identifierProperty)>
<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
<f:param name="${componentName}${componentProperty.name?cap_first}"
@@ -157,6 +157,20 @@
value="${'#'}{${componentName}.${pojo.identifierProperty.name}}"/>
</#if>
</s:link>
+ ${'#'}{' '}
+ <s:link view="/${'#'}{empty from ? '${pageName}' : from}.xhtml"
+ value="Edit"
+ id="list${componentName}EditId">
+<#if pojo.isComponent(pojo.identifierProperty)>
+<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
+ <f:param name="${componentName}${componentProperty.name?cap_first}"
+ value="${'#'}{${componentName}.${pojo.identifierProperty.name}.${componentProperty.name}}"/>
+</#foreach>
+<#else>
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
+ value="${'#'}{${componentName}.${pojo.identifierProperty.name}}"/>
+</#if>
+ </s:link>
</ice:column>
</ice:dataTable>
Modified: trunk/seam-gen/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/list.xhtml.ftl 2008-10-15 08:59:59 UTC (rev 9336)
+++ trunk/seam-gen/view/list.xhtml.ftl 2008-10-15 09:00:53 UTC (rev 9337)
@@ -21,11 +21,13 @@
<rich:simpleTogglePanel label="${entityName} Search Filter" switchType="ajax">
+<#assign searchParamNames = []/>
<#foreach property in pojo.allPropertiesIterator>
<#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
<#if c2j.isComponent(property)>
<#foreach componentProperty in property.value.propertyIterator>
<#if isString(componentProperty)>
+<#assign searchParamNames = searchParamNames + [componentProperty.name]/>
<s:decorate template="layout/display.xhtml">
<ui:define name="label">${label(componentProperty.name)}</ui:define>
<h:inputText id="${componentProperty.name}" value="${'#'}{${listName}.${componentName}.${property.name}.${componentProperty.name}}"/>
@@ -35,6 +37,7 @@
</#foreach>
<#else>
<#if isString(property)>
+<#assign searchParamNames = searchParamNames + [property.name]/>
<s:decorate template="layout/display.xhtml">
<ui:define name="label">${label(property.name)}</ui:define>
<h:inputText id="${property.name}" value="${'#'}{${listName}.${componentName}.${property.name}}"/>
@@ -49,6 +52,11 @@
<div class="actionButtons">
<h:commandButton id="search" value="Search" action="/${listPageName}.xhtml"/>
+ <s:button id="reset" value="Reset">
+<#list searchParamNames as paramName>
+ <f:param name="${paramName}"/>
+</#list>
+ </s:button>
</div>
</h:form>
@@ -124,7 +132,7 @@
</#if>
</#if>
</#foreach>
- <h:column>
+ <rich:column styleClass="action">
<f:facet name="header">Action</f:facet>
<s:link view="/${'#'}{empty from ? '${pageName}' : from}.xhtml"
value="${'#'}{empty from ? 'View' : 'Select'}"
@@ -140,7 +148,23 @@
value="${'#'}{_${componentName}.${pojo.identifierProperty.name}}"/>
</#if>
</s:link>
- </h:column>
+ ${'#'}{' '}
+ <s:link view="/${pageName}Edit.xhtml"
+ value="Edit"
+ propagation="none"
+ id="${componentName}Edit"
+ rendered="${'#'}{empty from}">
+<#if pojo.isComponent(pojo.identifierProperty)>
+<#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
+ <f:param name="${componentName}${componentProperty.name?cap_first}"
+ value="${'#'}{_${componentName}.${pojo.identifierProperty.name}.${componentProperty.name}}"/>
+</#foreach>
+<#else>
+ <f:param name="${componentName}${pojo.identifierProperty.name?cap_first}"
+ value="${'#'}{_${componentName}.${pojo.identifierProperty.name}}"/>
+</#if>
+ </s:link>
+ </rich:column>
</rich:dataTable>
</div>
Modified: trunk/seam-gen/view/stylesheet/theme.css
===================================================================
--- trunk/seam-gen/view/stylesheet/theme.css 2008-10-15 08:59:59 UTC (rev 9336)
+++ trunk/seam-gen/view/stylesheet/theme.css 2008-10-15 09:00:53 UTC (rev 9337)
@@ -186,3 +186,14 @@
ul.bullets li {
padding-bottom: 2px;
}
+
+td.action {
+ text-align: center;
+ width: 8em;
+ white-space: nowrap;
+}
+
+td.action a {
+ padding-left: 1px;
+ padding-right: 1px;
+}
More information about the seam-commits
mailing list