[seam-commits] Seam SVN: r9265 - in trunk/seam-gen: view and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sun Oct 12 02:01:40 EDT 2008


Author: dan.j.allen
Date: 2008-10-12 02:01:39 -0400 (Sun, 12 Oct 2008)
New Revision: 9265

Added:
   trunk/seam-gen/view/img/manytoone.gif
   trunk/seam-gen/view/img/onetomany.gif
Modified:
   trunk/seam-gen/resources/WEB-INF/web.xml
   trunk/seam-gen/view/edit.xhtml.ftl
   trunk/seam-gen/view/list.xhtml.ftl
   trunk/seam-gen/view/view.xhtml.ftl
Log:
use image in tab to denote parent and child associations
make script/style packs the default


Modified: trunk/seam-gen/resources/WEB-INF/web.xml
===================================================================
--- trunk/seam-gen/resources/WEB-INF/web.xml	2008-10-12 05:26:44 UTC (rev 9264)
+++ trunk/seam-gen/resources/WEB-INF/web.xml	2008-10-12 06:01:39 UTC (rev 9265)
@@ -23,16 +23,16 @@
       <param-value>disable</param-value>
    </context-param>
 
-   <!-- Change the load strategies to ALL to create bundles -->
+   <!-- Change load strategy to DEFAULT to disable sending scripts/styles as packs -->
 
    <context-param>
       <param-name>org.richfaces.LoadStyleStrategy</param-name>
-      <param-value>DEFAULT</param-value>
+      <param-value>ALL</param-value>
    </context-param>
 
    <context-param>
       <param-name>org.richfaces.LoadScriptStrategy</param-name>
-      <param-value>DEFAULT</param-value>
+      <param-value>ALL</param-value>
    </context-param>
  
    <!-- Seam -->

Modified: trunk/seam-gen/view/edit.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/edit.xhtml.ftl	2008-10-12 05:26:44 UTC (rev 9264)
+++ trunk/seam-gen/view/edit.xhtml.ftl	2008-10-12 06:01:39 UTC (rev 9265)
@@ -1,5 +1,6 @@
 <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<#include "../util/TypeInfo.ftl">
 <#assign entityName = pojo.shortName>
 <#assign componentName = entityName?uncap_first>
 <#assign homeName = componentName + "Home">
@@ -19,7 +20,7 @@
     <h:form id="${componentName}" styleClass="edit">
 
         <rich:panel>
-            <f:facet name="header">${'#'}{${homeName}.managed ? 'Edit' : 'Add'} ${entityName}</f:facet>
+            <f:facet name="header">${'#'}{${homeName}.managed ? 'Edit' : 'Add'} ${label(entityName)}</f:facet>
 <#foreach property in pojo.allPropertiesIterator>
 <#include "editproperty.xhtml.ftl">
 </#foreach>
@@ -128,28 +129,11 @@
 </#if>
 </#if>
 </#foreach>
-            <h:column>
-                <f:facet name="header">Action</f:facet>
-                <s:link view="/${parentPageName}.xhtml"
-                         id="view${parentName}"
-                      value="View"
-                propagation="none">
-<#if parentPojo.isComponent(parentPojo.identifierProperty)>
-<#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
-                    <f:param name="${parentName}${componentProperty.name?cap_first}"
-                            value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
-</#foreach>
-<#else>
-                    <f:param name="${parentName}${parentPojo.identifierProperty.name?cap_first}"
-                           value="${'#'}{_${parentName}.${parentPojo.identifierProperty.name}}"/>
-</#if>
-                </s:link>
-            </h:column>
         </rich:dataTable>
 
 <#if parentPojo.shortName!=pojo.shortName>
         <div class="actionButtons">
-            <s:button value="Select ${property.name}"
+            <s:button value="${'#'}{${homeName}.instance.${property.name} != null ? 'Change' : 'Select'} ${property.name}"
                        view="/${parentPageName}List.xhtml">
                 <f:param name="from" value="${pageName}Edit"/>
             </s:button>
@@ -193,24 +177,6 @@
 </#if>
 </#if>
 </#foreach>
-                <h:column>
-                    <f:facet name="header">Action</f:facet>
-                    <s:link view="/${childPageName}.xhtml"
-                              id="select${childName}"
-                           value="View"
-                     propagation="none">
-<#if childPojo.isComponent(childPojo.identifierProperty)>
-<#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
-                        <f:param name="${childName}${componentProperty.name?cap_first}"
-                                value="${'#'}{_${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
-</#foreach>
-<#else>
-                        <f:param name="${childName}${childPojo.identifierProperty.name?cap_first}"
-                                value="${'#'}{_${childName}.${childPojo.identifierProperty.name}}"/>
-</#if>
-                        <f:param name="${childName}From" value="${entityName}"/>
-                    </s:link>
-                </h:column>
             </rich:dataTable>
 
         </h:form>

Added: trunk/seam-gen/view/img/manytoone.gif
===================================================================
(Binary files differ)


Property changes on: trunk/seam-gen/view/img/manytoone.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/seam-gen/view/img/onetomany.gif
===================================================================
(Binary files differ)


Property changes on: trunk/seam-gen/view/img/onetomany.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/seam-gen/view/list.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/list.xhtml.ftl	2008-10-12 05:26:44 UTC (rev 9264)
+++ trunk/seam-gen/view/list.xhtml.ftl	2008-10-12 06:01:39 UTC (rev 9265)
@@ -19,7 +19,7 @@
 
     <h:form id="${componentName}Search" styleClass="edit">
 
-        <rich:simpleTogglePanel label="${entityName} search filter" switchType="ajax">
+        <rich:simpleTogglePanel label="${entityName} Search Filter" switchType="ajax">
 
 <#foreach property in pojo.allPropertiesIterator>
 <#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
@@ -54,7 +54,7 @@
     </h:form>
 
     <rich:panel>
-        <f:facet name="header">${entityName} search results</f:facet>
+        <f:facet name="header">${entityName} Search Results</f:facet>
     <div class="results" id="${componentName}List">
 
     <h:outputText value="The ${componentName} search returned no results."

Modified: trunk/seam-gen/view/view.xhtml.ftl
===================================================================
--- trunk/seam-gen/view/view.xhtml.ftl	2008-10-12 05:26:44 UTC (rev 9264)
+++ trunk/seam-gen/view/view.xhtml.ftl	2008-10-12 06:01:39 UTC (rev 9265)
@@ -17,7 +17,7 @@
 <ui:define name="body">
 
     <rich:panel>
-        <f:facet name="header">${entityName}</f:facet>
+        <f:facet name="header">${label(entityName)} Details</f:facet>
 <#foreach property in pojo.allPropertiesIterator>
 <#if !c2h.isCollection(property) && !isToOne(property) && property != pojo.versionProperty!>
 <#include "viewproperty.xhtml.ftl">
@@ -55,7 +55,10 @@
 <#assign parentPageName = parentPojo.shortName>
 <#assign parentName = parentPojo.shortName?uncap_first>
 
-    <rich:tab label="${label(property.name)}">
+    <rich:tab>
+        <f:facet name="label">
+            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>${label(property.name)}</h:panelGroup>
+        </f:facet>
     <div class="association" id="${property.name}Parent">
 
         <h:outputText value="There is no ${property.name} associated with this ${componentName}."
@@ -122,7 +125,10 @@
 </#if>
 <#if c2h.isOneToManyCollection(property)>
 
-    <rich:tab label="${label(property.name)}">
+    <rich:tab>
+        <f:facet name="label">
+            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>${label(property.name)}</h:panelGroup>
+        </f:facet>
     <h:form styleClass="association" id="${property.name}Children">
 
 <#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>




More information about the seam-commits mailing list