[jboss-cvs] jboss-seam/seam-gen/view ...
Gavin King
gavin.king at jboss.com
Fri Mar 9 18:55:07 EST 2007
User: gavin
Date: 07/03/09 18:55:07
Modified: seam-gen/view edit.xhtml.ftl home.xhtml list.xhtml.ftl
login.xhtml view.xhtml.ftl
Log:
integrate richfaces with seam-gen JBSEAM-1004
Revision Changes Path
1.42 +27 -26 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.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- edit.xhtml.ftl 25 Feb 2007 21:27:18 -0000 1.41
+++ edit.xhtml.ftl 9 Mar 2007 23:55:07 -0000 1.42
@@ -12,17 +12,18 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+ xmlns:rich="http://richfaces.ajax4jsf.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
- <h1>${entityName}</h1>
- <p>Generated edit page</p>
-
<h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
-
+ <rich:panel rendered="false"/>
<h:form id="${componentName}" styleClass="edit">
+ <div class="dr-pnl rich-panel">
+ <div class="dr-pnl-h rich-panel-header">Edit ${entityName}</div>
+ <div class="dr-pnl-b rich-panel-body">
<div class="dialog">
<s:validateAll>
<h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
@@ -34,6 +35,8 @@
</s:validateAll>
</div>
<div><span class="required">*</span> required fields</div>
+ </div>
+ </div>
<div class="actionButtons">
@@ -66,27 +69,26 @@
rendered="${'#'}{!${homeName}.managed}"/>
</div>
-
</h:form>
+
+ <rich:tabPanel switchType="ajax">
<#foreach property in pojo.allPropertiesIterator>
<#if c2h.isManyToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
- <div class="association" id="${property.name}Parent">
-
- <h3>
- ${property.name}
-<#if !property.optional>
- <s:span styleClass="required" rendered="${'#'}{${homeName}.instance.${property.name} == null}">*</s:span>
+<#if property.optional>
+ <rich:tab label="${property.name}">
+<#else>
+ <rich:tab label="${property.name} *" labelClass="required">
</#if>
- </h3>
+ <div class="association" id="${property.name}Parent">
<h:outputText value="No ${property.name}"
rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
- <h:dataTable var="${parentName}"
+ <rich:dataTable var="${parentName}"
value="${'#'}{${homeName}.instance.${property.name}}"
rendered="${'#'}{${homeName}.instance.${property.name} != null}"
rowClasses="rvgRowOne,rvgRowTwo"
@@ -141,7 +143,7 @@
</#if>
</s:link>
</h:column>
- </h:dataTable>
+ </rich:dataTable>
<#if parentPojo.shortName!=pojo.shortName>
<div class="actionButtons">
@@ -153,15 +155,13 @@
</#if>
</div>
+ </rich:tab>
</#if>
<#if c2h.isOneToManyCollection(property)>
- <f:subview rendered="${'#'}{${homeName}.managed}" id="${property.name}">
-
+ <rich:tab label="${property.name}">
<div class="association" id="${property.name}Children">
- <h3>${property.name}</h3>
-
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
<#assign childEditPageName = childPojo.shortName + "Edit">
@@ -169,7 +169,7 @@
<h:outputText value="No ${property.name}"
rendered="${'#'}{empty ${homeName}.${property.name}}"/>
- <h:dataTable value="${'#'}{${homeName}.${property.name}}"
+ <rich:dataTable value="${'#'}{${homeName}.${property.name}}"
var="${childName}"
rendered="${'#'}{not empty ${homeName}.${property.name}}"
rowClasses="rvgRowOne,rvgRowTwo"
@@ -209,10 +209,11 @@
<f:param name="${childName}From" value="${entityName}"/>
</s:link>
</h:column>
- </h:dataTable>
+ </rich:dataTable>
</div>
+ <f:subview rendered="${'#'}{${homeName}.managed}" id="${property.name}">
<div class="actionButtons">
<s:button id="add${childName}"
value="Add ${childName}"
@@ -223,11 +224,11 @@
<f:param name="${childName}From" value="${entityName}"/>
</s:button>
</div>
-
</f:subview>
+ </rich:tab>
</#if>
</#foreach>
-
+ </rich:tabPanel>
</ui:define>
</ui:composition>
1.6 +6 -1 jboss-seam/seam-gen/view/home.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: home.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/view/home.xhtml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- home.xhtml 7 Nov 2006 06:34:24 -0000 1.5
+++ home.xhtml 9 Mar 2007 23:55:07 -0000 1.6
@@ -5,12 +5,15 @@
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:rich="http://richfaces.ajax4jsf.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
<h:messages globalOnly="true" styleClass="message"/>
+ <rich:panel>
+ <f:facet name="header">Welcome!</f:facet>
<p>This empty shell application includes:</p>
<ul>
<li>Ant build script</li>
@@ -22,5 +25,7 @@
<li>Default CSS stylesheet</li>
<li>Internationalization support</li>
</ul>
+ </rich:panel>
+
</ui:define>
</ui:composition>
1.18 +9 -8 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.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- list.xhtml.ftl 25 Feb 2007 21:27:18 -0000 1.17
+++ list.xhtml.ftl 9 Mar 2007 23:55:07 -0000 1.18
@@ -12,17 +12,16 @@
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:rich="http://richfaces.ajax4jsf.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
- <h1>${entityName} search</h1>
- <p>Generated search page</p>
-
<h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
<h:form id="${componentName}" styleClass="edit">
+ <rich:simpleTogglePanel label="${entityName} search parameters" switchType="ajax">
<div class="dialog">
<h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
@@ -49,6 +48,7 @@
</#foreach>
</h:panelGrid>
</div>
+ </rich:simpleTogglePanel>
<div class="actionButtons">
<h:commandButton id="search" value="Search" action="/${listPageName}.xhtml"/>
@@ -56,14 +56,14 @@
</h:form>
+ <rich:panel>
+ <f:facet name="header">${entityName} search results</f:facet>
<div class="results" id="${componentName}List">
- <h3>search results</h3>
-
<h:outputText value="No ${componentName} exists"
rendered="${'#'}{empty ${listName}.resultList}"/>
- <h:dataTable id="${listName}"
+ <rich:dataTable id="${listName}"
var="${componentName}"
value="${'#'}{${listName}.resultList}"
rendered="${'#'}{not empty ${listName}.resultList}">
@@ -133,9 +133,10 @@
</#if>
</s:link>
</h:column>
- </h:dataTable>
+ </rich:dataTable>
</div>
+ </rich:panel>
<div class="tableControl">
1.7 +8 -2 jboss-seam/seam-gen/view/login.xhtml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: login.xhtml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/seam-gen/view/login.xhtml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- login.xhtml 10 Feb 2007 07:33:22 -0000 1.6
+++ login.xhtml 9 Mar 2007 23:55:07 -0000 1.7
@@ -5,11 +5,15 @@
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:rich="http://richfaces.ajax4jsf.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
- <h1>Login</h1>
+ <rich:panel rendered="false"/>
+ <div class="dr-pnl rich-panel">
+ <div class="dr-pnl-h rich-panel-header">Login</div>
+ <div class="dr-pnl-b rich-panel-body">
<p>Please login using any username and password</p>
<h:messages styleClass="message"/>
@@ -35,6 +39,8 @@
</div>
</h:form>
+ </div>
+ </div>
</ui:define>
</ui:composition>
1.18 +17 -13 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.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- view.xhtml.ftl 25 Feb 2007 21:27:18 -0000 1.17
+++ view.xhtml.ftl 9 Mar 2007 23:55:07 -0000 1.18
@@ -11,15 +11,16 @@
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:rich="http://richfaces.ajax4jsf.org/rich"
template="layout/template.xhtml">
<ui:define name="body">
- <h1>${entityName}</h1>
- <p>Generated view page</p>
-
<h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
+ <rich:panel>
+ <f:facet name="header">${entityName}</f:facet>
+
<div id="${componentName}" class="dialog">
<h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
<#foreach property in pojo.allPropertiesIterator>
@@ -30,6 +31,7 @@
</h:panelGrid>
</div>
+ </rich:panel>
<div class="actionButtons">
@@ -42,20 +44,21 @@
value="Done"/>
</div>
+
+ <rich:tabPanel switchType="ajax">
<#foreach property in pojo.allPropertiesIterator>
<#if c2h.isManyToOne(property)>
<#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
<#assign parentPageName = parentPojo.shortName>
<#assign parentName = util.lower(parentPojo.shortName)>
+ <rich:tab label="${property.name}">
<div class="association" id="${property.name}Parent">
- <h3>${property.name}</h3>
-
<h:outputText value="No ${property.name}"
rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
- <h:dataTable var="${parentName}"
+ <rich:dataTable var="${parentName}"
value="${'#'}{${homeName}.instance.${property.name}}"
rendered="${'#'}{${homeName}.instance.${property.name} != null}"
rowClasses="rvgRowOne,rvgRowTwo"
@@ -109,16 +112,16 @@
</#if>
</s:link>
</h:column>
- </h:dataTable>
+ </rich:dataTable>
</div>
+ </rich:tab>
</#if>
<#if c2h.isOneToManyCollection(property)>
+ <rich:tab label="${property.name}">
<div class="association" id="${property.name}Children">
- <h3>${property.name}</h3>
-
<#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
<#assign childPageName = childPojo.shortName>
<#assign childEditPageName = childPojo.shortName + "Edit">
@@ -127,7 +130,7 @@
<h:outputText value="No ${property.name}"
rendered="${'#'}{empty ${homeName}.${property.name}}"/>
- <h:dataTable value="${'#'}{${homeName}.${property.name}}"
+ <rich:dataTable value="${'#'}{${homeName}.${property.name}}"
var="${childName}"
rendered="${'#'}{not empty ${homeName}.${property.name}}"
rowClasses="rvgRowOne,rvgRowTwo"
@@ -166,7 +169,7 @@
<f:param name="${childName}From" value="${entityName}"/>
</s:link>
</h:column>
- </h:dataTable>
+ </rich:dataTable>
</div>
@@ -179,9 +182,10 @@
<f:param name="${childName}From" value="${entityName}"/>
</s:button>
</div>
+ </rich:tab>
</#if>
</#foreach>
-
+</rich:tabPanel>
</ui:define>
</ui:composition>
More information about the jboss-cvs-commits
mailing list