[jboss-cvs] jboss-seam/seam-gen/icefaces/view ...

Michael Yuan michael.yuan at jboss.com
Sun Jul 15 20:54:17 EDT 2007


  User: myuan   
  Date: 07/07/15 20:54:17

  Added:       seam-gen/icefaces/view                      action.xhtml
                        conversation.xhtml edit.page.xml.ftl edit.xhtml
                        edit.xhtml.ftl editproperty.xhtml.ftl error.xhtml
                        form.xhtml home.xhtml index.html list.page.xml.ftl
                        list.xhtml list.xhtml.ftl login.page.xml
                        login.xhtml page.xhtml param.xml.ftl query.xhtml
                        view.page.xml.ftl view.xhtml.ftl
                        viewproperty.xhtml.ftl
  Log:
  Support for icefaces
  
  Revision  Changes    Path
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/action.xhtml
  
  Index: action.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"  
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
  
      <h:messages globalOnly="true" styleClass="message"/>
  
   <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
      <f:facet name="header">
          <ice:panelGroup styleClass="expandableStateIndicator">		
  		<ice:outputText value="@pageName@" />
          </ice:panelGroup>
      </f:facet>
       <ice:form id="@componentName at Form">
          
              <h:commandButton id="@methodName@" value="@methodName@!" 
                               action="#{@componentName at .@methodName@}"/>     			  
          
          </ice:form>
          
      </ice:panelCollapsible>
  
  </ui:define>
  
  </ui:composition>
  
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/conversation.xhtml
  
  Index: conversation.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf"
                  xmlns:h="http://java.sun.com/jsf/html"
  		    xmlns:ice="http://www.icesoft.com/icefaces/component"  
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
  
      <h:messages globalOnly="true" styleClass="message"/>
      
   <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
      <f:facet name="header">
          <ice:panelGroup styleClass="expandableStateIndicator">		
            <ice:outputText value=="@pageName@" />
          </ice:panelGroup>
      </f:facet>
          <div class="dialog">
              <div class="prop">
                  <span class="name">Value</span>
                  <span class="value">#{@componentName at .value}</span>
              </div>
          </div>
      
      </ice:panelCollapsible>
      
      <ice:form id="@componentName at Form">
          <div class="actionButtons">
              <h:commandButton id="begin" value="Begin" 
                  action="#{@componentName at .begin}"/>     			  
              <h:commandButton id="inc" value="Increment" 
                  action="#{@componentName at .increment}"/>     			  
              <h:commandButton id="end" value="End" 
                  action="#{@componentName at .end}"/>     			  
          </div>
      </ice:form>
      
  </ui:define>
  
  </ui:composition>
  
  
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/edit.page.xml.ftl
  
  Index: edit.page.xml.ftl
  ===================================================================
  <!DOCTYPE page PUBLIC
            "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
            "http://jboss.com/products/seam/pages-1.2.dtd">
  
  <#assign entityName = pojo.shortName>
  <#assign componentName = util.lower(entityName)>
  <#assign homeName = componentName + "Home">
  <#assign masterPageName = entityName + "List">
  <#assign pageName = entityName>
  <page no-conversation-view-id="/${masterPageName}.xhtml"
                 login-required="true">
     
     <begin-conversation join="true"/>
     
     <action execute="${'#'}{${homeName}.wire}"/>
     
     <param name="${componentName}From"/>
  <#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)>
     <param name="${cidName}" value="${'#'}{${homeName}.${idName}.${componentProperty.name}}"/>
  </#foreach>
  <#else>
     <param name="${idName}" value="${'#'}{${homeName}.${idName}}"/>
  </#if>
  <#assign entities=util.set()>
  <#if entities.add(pojo.shortName)>
  <#include "param.xml.ftl">
  </#if>
  
     <navigation from-action="${'#'}{${homeName}.persist}">
         <end-conversation/>
         <redirect view-id="/${pageName}.xhtml"/>
     </navigation>
     
     <navigation from-action="${'#'}{${homeName}.update}">
         <end-conversation/>
         <redirect view-id="/${pageName}.xhtml"/>
     </navigation>
     
     <navigation from-action="${'#'}{${homeName}.remove}">
         <end-conversation/>
         <redirect view-id="/${masterPageName}.xhtml"/>
     </navigation>
     
  </page>
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/edit.xhtml
  
  Index: edit.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"  
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
  
      <h:messages globalOnly="true" styleClass="message"/>
      
      <ice:form id="@componentName at EditForm">
           <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
             <f:facet name="header">
                <ice:panelGroup styleClass="expandableStateIndicator">
  		      <ice:outputText value="@pagename@"/>
                </ice:panelGroup>
  		</f:facet>
             <s:decorate id="nameDecoration" template="layout/edit.xhtml">
                  <ui:define name="label">Name</ui:define>
                  <h:inputText id="name" required="true"
                               value="#{@homeName at .instance.name}"/>
              </s:decorate>
              
              <div style="clear:both"/>
          </ice:panelCollapsible>
  
          <div class="actionButtons">
              <h:commandButton id="save" value="Save" 
                  action="#{@homeName at .persist}"
                  rendered="#{!@homeName at .managed}"/>     			  
              <h:commandButton id="update" value="Save" 
                  action="#{@homeName at .update}"
                  rendered="#{@homeName at .managed}"/>    			  
              <h:commandButton id="delete" value="Delete" 
                  action="#{@homeName at .remove}"
                  rendered="#{@homeName at .managed}"/>
              <s:button id="done" value="Done"
                  propagation="end" view="/@masterPageName at .xhtml"/>			  
          </div>
      </ice:form>
      
  </ui:define>
  
  </ui:composition>
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/edit.xhtml.ftl
  
  Index: edit.xhtml.ftl
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <#assign entityName = pojo.shortName>
  <#assign componentName = util.lower(entityName)>
  <#assign homeName = componentName + "Home">
  <#assign masterPageName = entityName + "List">
  <#assign pageName = entityName>
  
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component" 
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
      
      <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
      
      <ice:form id="${componentName}editForm" styleClass="edit">
        <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
         <f:facet name="header">
          <ice:panelGroup styleClass="expandableStateIndicator">
  			    <ice:outputText value="Edit ${componentName}"/>
          </ice:panelGroup>
  	</f:facet>        
        <ice:panelGroup styleClass="edit">
  		 
                       <f:facet name="beforeInvalidField">
                                  <ice:graphicImage styleClass="errorImg" value="img/error.png"/>
                          </f:facet>
                          <f:facet name="afterInvalidField">
                                      <s:message styleClass="errorMsg" />
                          </f:facet>
                          <f:facet name="aroundInvalidField">
                                  <s:div styleClass="error"/>
                      </f:facet> 
  			<s:validateAll>
  			 <ice:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
  <#foreach property in pojo.allPropertiesIterator>
  <#include "editproperty.xhtml.ftl">
  </#foreach>
                    <div style="clear:both">
                       <span class="required">*</span> 
                                      required fields
                    </div>
    		  
  		</ice:panelGrid>
  		</s:validateAll>
            </ice:panelGroup>
  	  </ice:panelCollapsible>
                    
          <div class="actionButtons">
          
              <h:commandButton id="save" 
                            value="Save" 
                           action="${'#'}{${homeName}.persist}"
                         disabled="${'#'}{!${homeName}.wired}"
                         rendered="${'#'}{!${homeName}.managed}"/>  
                            			  
              <h:commandButton id="update" 
                            value="Save" 
                           action="${'#'}{${homeName}.update}"
                         rendered="${'#'}{${homeName}.managed}"/>
                          			  
              <h:commandButton id="delete" 
                            value="Delete" 
                           action="${'#'}{${homeName}.remove}"
                         rendered="${'#'}{${homeName}.managed}"/>
                      
              <s:button id="done" 
                     value="Done"
               propagation="end"
                      view="/${pageName}.xhtml"
                  rendered="${'#'}{${homeName}.managed}"/>
                  
              <s:button id="cancel" 
                     value="Cancel"
               propagation="end"
                      view="/${'#'}{empty ${componentName}From ? '${masterPageName}' : ${componentName}From}.xhtml"
                  rendered="${'#'}{!${homeName}.managed}"/>
                  
          </div>
          
      </ice:form>
  <#assign hasAssociations=false>
  <#foreach property in pojo.allPropertiesIterator>
  <#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
  <#assign hasAssociations=true>
  </#if>
  </#foreach>
  
  <#if hasAssociations>
   <ice:form>  
          <ice:panelTabSet styleClass="componentPanelTabSetLayout" style="margin-bottom:5px;margin-top:10px;">
  </#if>
  <#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)>
     
  <#if property.optional>
  	<ice:panelTab label="${property.name}">
  <#else>
   	<ice:panelTab label="${property.name} *" labelClass="required">
  </#if>
  		<div class="association" id="${property.name}Parent">
      
          	<h:outputText value="No ${property.name}" 
                     rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
         	<ice:dataTable var="${parentName}" 
                     value="${'#'}{${homeName}.instance.${property.name}}" 
                  rendered="${'#'}{${homeName}.instance.${property.name} != null}"
                rowClasses="rvgRowOne,rvgRowTwo"
  		  columnClasses="allCols"
                        id="${property.name}Table">
  <#foreach parentProperty in parentPojo.allPropertiesIterator>
  <#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty)>
  <#if parentPojo.isComponent(parentProperty)>
  <#foreach componentProperty in parentProperty.value.propertyIterator>
              <ice:column>
                  <f:facet name="header">${componentProperty.name}</f:facet>
                  ${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
              </ice:column>
  </#foreach>
  <#else>
              <ice:column>
                  <f:facet name="header">${parentProperty.name}</f:facet>
                  ${'#'}{${parentName}.${parentProperty.name}}
              </ice:column>
  </#if>
  </#if>
  <#if c2h.isManyToOne(parentProperty)>
  <#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
  <#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
  <#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
              <ice:column>
  	    	    <f:facet name="header">${parentProperty.name} ${componentProperty.name}</f:facet>
  		    	${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
              </ice:column>
  </#foreach>
  <#else>
              <ice:column>
  	    	    <f:facet name="header">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</f:facet>
  		    	${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
              </ice:column>
  </#if>
  </#if>
  </#foreach>
              <ice: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}${util.upper(componentProperty.name)}" 
                              value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
  </#foreach>
  <#else>
                      <f:param name="${parentName}${util.upper(parentPojo.identifierProperty.name)}" 
                             value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
  </#if>
                  </s:link>
              </ice:column>
        </ice:dataTable>
  <#if parentPojo.shortName!=pojo.shortName>
          <div class="actionButtons">
              <s:button value="Select ${property.name}"
                         view="/${parentPageName}List.xhtml">
                  <f:param name="from" value="${pageName}Edit"/>
              </s:button>
          </div>
          
  </#if>
      </div>
      </ice:panelTab>
  </#if>
  <#if c2h.isOneToManyCollection(property)>
   	<ice:panelTab label="${property.name}">
          <div class="association" id="${property.name}Children">
          
  <#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
  <#assign childPageName = childPojo.shortName>
  <#assign childEditPageName = childPojo.shortName + "Edit">
  <#assign childName = util.lower(childPojo.shortName)>
              <h:outputText value="No ${property.name}" 
                         rendered="${'#'}{empty ${homeName}.${property.name}}"/>
             <ice:dataTable value="${'#'}{${homeName}.${property.name}}" 
                             var="${childName}" 
                        rendered="${'#'}{not empty ${homeName}.${property.name}}" 
                      rowClasses="rvgRowOne,rvgRowTwo"
  			  columnClasses="allCols"
                              id="${property.name}Table">
  <#foreach childProperty in childPojo.allPropertiesIterator>
  <#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty)>
  <#if childPojo.isComponent(childProperty)>
  <#foreach componentProperty in childProperty.value.propertyIterator>
                 <ice:column>
                      <f:facet name="header">${componentProperty.name}</f:facet>
                      ${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
                  </ice:column>
  </#foreach>
  <#else>
                  <ice:column>
                      <f:facet name="header">${childProperty.name}</f:facet>
                      <h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
                  </ice:column>
  </#if>
  </#if>
  </#foreach>
                  <ice:column>
                      <f:facet name="header">action</f:facet>
                      <s:link view="/${childPageName}.xhtml" 
                                id="select${childName}" 
                             value="Select"
                       propagation="none">
  <#if childPojo.isComponent(childPojo.identifierProperty)>
  <#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
                          <f:param name="${childName}${util.upper(componentProperty.name)}" 
                                  value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
  </#foreach>
  <#else>
                          <f:param name="${childName}${util.upper(childPojo.identifierProperty.name)}" 
                                  value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
  </#if>
                          <f:param name="${childName}From" value="${entityName}"/>
                      </s:link>
                  </ice:column>
             </ice:dataTable>
        </div>
          <f:subview rendered="${'#'}{${homeName}.managed}" id="${property.name}">
          <div class="actionButtons">
              <s:button id="add${childName}" 
                     value="Add ${childName}"
                      view="/${childEditPageName}.xhtml"
               propagation="none">
                   <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}" 
                           value="${'#'}{${homeName}.instance.${pojo.identifierProperty.name}}"/>
                   <f:param name="${childName}From" value="${entityName}"/>
              </s:button>
          </div>
          </f:subview>
      </ice:panelTab>
  </#if>
  </#foreach>
  <#if hasAssociations>
  </ice:panelTabSet>
  </ice:form>
  </#if>
  </ui:define>
  
  </ui:composition>
  
  
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/editproperty.xhtml.ftl
  
  Index: editproperty.xhtml.ftl
  ===================================================================
  <#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
  <#assign propertyIsId = property.equals(pojo.identifierProperty)>
  <#if !propertyIsId || property.value.identifierGeneratorStrategy == "assigned">
  <#if pojo.isComponent(property)>
  <#foreach componentProperty in property.value.propertyIterator>
  <#assign column = componentProperty.columnIterator.next()>
  <#assign propertyType = componentProperty.value.typeName>
  			<s:validateAll>
                      <h:outputLabel for="${componentProperty.name}">
                          ${componentProperty.name}
  <#if !column.nullable>
                          <span class="required">*</span>
  </#if>
                      </h:outputLabel>
                      <s:decorate id="${componentProperty.name}Decoration">
  <#if propertyType == "date">
                          <ice:selectInputDate id="${componentProperty.name}" 
                                renderAsPopup="true"
  <#if propertyIsId>
                                        disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                        required="true"
  </#if>
                                           value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                                  
                             </ice:selectInputDate>
                        <#elseif propertyType == "time">
                          <ice:inputText id="${componentProperty.name}" 
                                     size="5"
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                              <s:convertDateTime type="time"/>
                          </ice:inputText>
  <#elseif propertyType == "timestamp">
                          <ice:inputText id="${componentProperty.name}" 
                                     size="16"
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                               <s:convertDateTime type="both" dateStyle="short"/>
                          </ice:inputText>
  <#elseif propertyType == "big_decimal">
                          <ice:inputText id="${componentProperty.name}" 
                                partialSubmit="true"
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
                                     size="${column.precision+7}">
                          </ice:inputText>
  <#elseif propertyType == "big_integer">
                          <ice:inputText id="${componentProperty.name}" 
  					partialSubmit="true"
  <#if propertyIsId>
                                 disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
                                     size="${column.precision+6}">
                          </ice:inputText>
  <#elseif propertyType == "boolean" || propertyType == "yes_no" || propertyType == "true_false">
                           <h:selectBooleanCheckbox id="${componentProperty.name}"
  <#if !column.nullable>
                                              required="true"
  </#if>
  <#if propertyIsId>
                                              disabled="${'#'}{${homeName}.managed}"
  </#if>
                                                 value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"/>
  <#elseif propertyType == "string">
  <#if column.length gt 160>
  <#if column.length gt 800>
  <#assign rows = 10>
  <#else>
  <#assign rows = (column.length/80)?int>
  </#if>
                          <h:inputTextarea id="${componentProperty.name}"
                                         cols="80"
                                         rows="${rows}"
  <#if propertyIsId>
                                     disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                     required="true"
  </#if>
                                        value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"/>
  <#else>
  <#if column.length gt 100>
  <#assign size = 100>
  <#else>
  <#assign size = column.length>
  </#if>
                          <h:inputText id="${componentProperty.name}" 
  <#if propertyIsId>
                                 disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                required="true"
  </#if>
                                    size="${size}"
                               maxlength="${column.length}"
                                   value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                          </h:inputText>
  </#if>
  <#else>
                          <h:inputText id="${componentProperty.name}"
  <#if !column.nullable>
                                 required="true"
  </#if>
  <#if propertyIsId>
                                 disabled="${'#'}{${homeName}.managed}"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                          </h:inputText>
  </#if>
                      </s:decorate>
  </#foreach>
  <#else>
  <#assign column = property.columnIterator.next()>
  <#assign propertyType = property.value.typeName>
  
                      <h:outputLabel for="${property.name}">
                          ${property.name}
  <#if !column.nullable>
                          <span class="required">*</span>
  </#if>
                      </h:outputLabel>
                      <s:decorate id="${property.name}Decoration">
  <#if propertyType == "date">
                             <ice:selectInputDate id="${property.name}" 
                                renderAsPopup="true"
  
  <#if propertyIsId>
                                 disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}}">
                           </ice:selectInputDate>
  <#elseif propertyType == "time">
                          <ice:inputText id="${property.name}" 
                                     size="5"
  					partialSubmit="true"
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}}">
                              <s:convertDateTime type="time"/>
                          </ice:inputText>
  <#elseif propertyType == "timestamp">
                          <ice:inputText id="${property.name}" 
                                     size="16"
  					partialSubmit="true"
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}}">
                              <s:convertDateTime type="both" dateStyle="short"/>
                          </ice:inputText>
  <#elseif propertyType == "big_decimal">
                          <ice:inputText id="${property.name}" 
  					partialSubmit="true"
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}}"
                                     size="${column.precision+7}">
                          </ice:inputText>
  <#elseif propertyType == "big_integer">
                          <ice:inputText id="${property.name}" partialSubmit="true"
  <#if propertyIsId>
                                 disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                 required="true"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}}"
                                     size="${column.precision+6}"/>
  <#elseif propertyType == "boolean" || propertyType == "yes_no" || propertyType == "true_false">
                          <ice:selectBooleanCheckbox id="${property.name}"
  						partialSubmit="true"
  <#if !column.nullable>
                                             required="true"
  </#if>
  <#if propertyIsId>
                                             disabled="${'#'}{${homeName}.managed}"
  </#if>
                                                value="${'#'}{${homeName}.instance.${property.name}}"/>
  <#elseif propertyType == "string">
  <#if column.length gt 160>
  <#if column.length gt 800>
  <#assign rows = 10>
  <#else>
  <#assign rows = (column.length/80)?int>
  </#if>
                          <ice:inputTextarea id="${property.name}"
                                         cols="80"
                                         rows="${rows}"
  					partialSubmit="true"
  <#if propertyIsId>
                                     disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                     required="true"
  </#if>
                                        value="${'#'}{${homeName}.instance.${property.name}}"/>
  <#else>
  <#if column.length gt 100>
  <#assign size = 100>
  <#else>
  <#assign size = column.length>
  </#if>
                          <ice:inputText id="${property.name}" 
  					partialSubmit="true"
  <#if propertyIsId>
                                 disabled="${'#'}{${homeName}.managed}"
  </#if>
  <#if !column.nullable>
                                 required="true"
  </#if>
                                     size="${size}"
                                maxlength="${column.length}"
                                    value="${'#'}{${homeName}.instance.${property.name}}">
                          </ice:inputText>
  </#if>
  <#else>
                          <ice:inputText id="${property.name}"
  					partialSubmit="true"
  <#if !column.nullable>
                                 required="true"
  </#if>
  <#if propertyIsId>
                                 disabled="${'#'}{${homeName}.managed}"
  </#if>
                                    value="${'#'}{${homeName}.instance.${property.name}}">
                          </ice:inputText>
  </#if>
                      </s:decorate>
  </#if>
  </#if>
  </#if>
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/error.xhtml
  
  Index: error.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:h="http://java.sun.com/jsf/html"
                  template="layout/template.xhtml">
  
  <ui:define name="body">
  
      <h1>Error</h1>
      <p>Something bad happened :-(</p>
      
      <h:messages styleClass="message"/>
          
  </ui:define> 
  </ui:composition>
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/form.xhtml
  
  Index: form.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"  
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
      
      <h:messages globalOnly="true" styleClass="message"/>
      
      <ice:form id="@componentName at form">
  
  	 <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
            <f:facet name="header">
             <ice:panelGroup styleClass="expandableStateIndicator">
  			<ice:outputText value="@pageName@"/>
             </ice:panelGroup>
  	    </f:facet>
             <s:decorate id="valueDecoration" template="layout/edit.xhtml">
                  <ui:define name="label">Value</ui:define>
                  <h:inputText id="value" required="true"
                               value="#{@componentName at .value}"/>
              </s:decorate>
              
              <div style="clear:both"/>
  
          </ice:panelCollapsible>
  
          <div class="actionButtons">
              <h:commandButton id="@methodName@" value="@methodName@" 
                  action="#{@componentName at .@methodName@}"/>     			  
          </div>
      </ice:form>
      
  </ui:define>
  
  </ui:composition>
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/home.xhtml
  
  Index: home.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"
                  template="layout/template.xhtml">
  
  <ui:define name="body">
  
       <h:messages globalOnly="true" styleClass="message"/>
      
          <ice:panelGrid columns="2" columnClasses="leftMenu,leftMenu">
               <img src="img/ICEfaces-logo.gif" alt="Icefaces and Seam: framework demo"/>   
               <ice:panelGroup >
                      <p>This ICEfaces 1.6.DR5 + Seam 1.3.0 enabled Application includes:</p>
                          <ul>
                              <li>Ant build script</li>
                              <li>Deployment to JBoss AS 4.2.0 </li>
                              <li>Integration testing using TestNG and JBoss Embeddable EJB3</li>
                              <li>EJB 3.0 Seam components</li>
                              <li>Templated Facelets views with Icefaces components</li>
                              <li>HSQL (or MySQL) Datasource</li>
                              <li>Default CSS stylesheet</li>
                              <li>Internationalization support</li>
                          </ul>
              </ice:panelGroup>
          </ice:panelGrid>
      
  </ui:define> 
  </ui:composition>
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/index.html
  
  Index: index.html
  ===================================================================
  <html>
  <head>
    <meta http-equiv="Refresh" content="0; URL=home.seam">
  </head>
  </html>
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/list.page.xml.ftl
  
  Index: list.page.xml.ftl
  ===================================================================
  <!DOCTYPE page PUBLIC
            "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
            "http://jboss.com/products/seam/pages-1.2.dtd">
  
  <#assign entityName = pojo.shortName>
  <#assign componentName = util.lower(entityName)>
  <#assign listName = componentName + "List">
  <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)>
  <#foreach componentProperty in property.value.propertyIterator>
  <#if componentProperty.value.typeName == "string">
     <param name="${componentProperty.name}" value="${'#'}{${listName}.${componentName}.${property.name}.${componentProperty.name}}"/>
  </#if>
  </#foreach>
  <#else>
  <#if property.value.typeName == "string">
     <param name="${property.name}" value="${'#'}{${listName}.${componentName}.${property.name}}"/>
  </#if>
  </#if>
  </#if>
  </#foreach>
  </page>
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/list.xhtml
  
  Index: list.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component" 
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
      
      <h:messages globalOnly="true" styleClass="message"/>
     
   <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
      <f:facet name="header">
          <ice:panelGroup styleClass="expandableStateIndicator">
  		<ice:outputText value="@masterPageName@"/>
          </ice:panelGroup>
  	</f:facet>
        <div class="results">
       
      		<h:outputText value="No @componentName@ exists" 
              	rendered="#{empty @listName at .resultList}"/>
      		<ice:dataTable id="@listName@" var="@componentName@"
             			 value="#{@listName at .resultList}" 
  				columnClasses="allCols"
             			rendered="#{not empty @listName at .resultList}">
          		<ice:column>
              		<f:facet name="header">Id</f:facet>
              		#{@componentName at .id}
          		</ice:column>
          		<ice:column>
             			<f:facet name="header">Name</f:facet>
              		<s:link id="@componentName@" value="#{@componentName at .name}" view="/@pageName at .xhtml">
                  		<f:param name="@componentName at Id" value="#{@componentName at .id}"/>
              		</s:link>
          		</ice:column>
      		</ice:dataTable>
        </div>
     </ice:panelCollapsible>
     <div class="actionButtons">
          <s:button id="done" value="Create @componentName@"
              view="/@pageName at .xhtml"/>			  
     </div>
      
  </ui:define>
  
  </ui:composition>
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/list.xhtml.ftl
  
  Index: list.xhtml.ftl
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <#assign entityName = pojo.shortName>
  <#assign componentName = util.lower(entityName)>
  <#assign listName = componentName + "List">
  <#assign pageName = entityName>
  <#assign editPageName = entityName + "Edit">
  <#assign listPageName = entityName + "List">
  
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"  
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
      
      <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
      
      <ice:form id="${componentName}Form" styleClass="edit">
        <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
         <f:facet name="header">
          <ice:panelGroup styleClass="expandableStateIndicator">
                    <ice:outputText value="${entityName} search"/>
  	  </ice:panelGroup>
         </f:facet>        
          <ice:panelGroup styleClass="edit">
  		 <ice:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
  <#foreach property in pojo.allPropertiesIterator>
  <#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
  <#if c2j.isComponent(property)>
  <#foreach componentProperty in property.value.propertyIterator>
  <#if componentProperty.value.typeName == "string">
  	
                    <h:outputLabel for="${componentProperty.name}">${componentProperty.name}</h:outputLabel>
                    <ice:inputText id="${componentProperty.name}" 
                            value="${'#'}{${listName}.${componentName}.${property.name}.${componentProperty.name}}"
  				partialSubmit="true"/>
  	         
  </#if>
  </#foreach>
  <#else>
  <#if property.value.typeName == "string">
  	
                  <h:outputLabel for="${property.name}">${property.name}</h:outputLabel>
                  <ice:inputText id="${property.name}" 
                            value="${'#'}{${listName}.${componentName}.${property.name}}"
  				  partialSubmit="true"/>
  	
  </#if>
  </#if>
  </#if>
  </#foreach>
              </ice:panelGrid>
     
  	</ice:panelGroup>
     </ice:panelCollapsible>
          
          <div class="actionButtons">
              <ice:commandButton id="search" value="Search" action="/${listPageName}.xhtml"/>
          </div>
        
      </ice:form>
      
      <ice:panelGroup styleClass="formBorderHighlight">
  
      <h3>${componentName}  search results</h3>
  
      <div class="searchResults" id="contactgroupListResults">
      <ice:outputText value="No ${componentName} exists" 
                 rendered="${'#'}{empty ${listName}.resultList}"/>
                 
      <ice:dataTable id="${listName}" 
                  var="${componentName}"
                value="${'#'}{${listName}.resultList}" 
  		columnClasses="allCols"
             rendered="${'#'}{not empty ${listName}.resultList}">
  <#foreach property in pojo.allPropertiesIterator>
  <#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
  <#if pojo.isComponent(property)>
  <#foreach componentProperty in property.value.propertyIterator>
          <ice:column>
              <f:facet name="header">${componentProperty.name}</f:facet>
              ${'#'}{${componentName}.${property.name}.${componentProperty.name}}
          </ice:column>
  </#foreach>
  <#else>
          <ice:column>
              <f:facet name="header">
                  <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>
              ${'#'}{${componentName}.${property.name}}&amp;nbsp;
          </ice:column>
  </#if>
  </#if>
  <#if c2h.isManyToOne(property)>
  <#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
  <#if parentPojo.isComponent(parentPojo.identifierProperty)>
  <#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
          <ice:column>
              <f:facet name="header">
  <#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name + '.' + componentProperty.name>
                  <s:link styleClass="columnHeader"
                               value="${property.name} ${componentProperty.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>
              ${'#'}{${componentName}.${propertyPath}}&amp;nbsp;
          </ice:column>
  </#foreach>
  <#else>
          <ice:column>
              <f:facet name="header">
  <#assign propertyPath = property.name + '.' + parentPojo.identifierProperty.name>
                  <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>
              ${'#'}{${componentName}.${propertyPath}}
          </ice:column>
  </#if>
  </#if>
  </#foreach>
          <ice:column>
              <f:facet name="header">action</f:facet>
              <s:link view="/${'#'}{empty from ? '${pageName}' : from}.xhtml" 
                     value="Select" 
                        id="${componentName}">
  <#if pojo.isComponent(pojo.identifierProperty)>
  <#foreach componentProperty in pojo.identifierProperty.value.propertyIterator>
                  <f:param name="${componentName}${util.upper(componentProperty.name)}" 
                          value="${'#'}{${componentName}.${pojo.identifierProperty.name}.${componentProperty.name}}"/>
  </#foreach>
  <#else>
                  <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}" 
                          value="${'#'}{${componentName}.${pojo.identifierProperty.name}}"/>
  </#if>
              </s:link>
          </ice:column>
      </ice:dataTable>
  
      </div>
  </ice:panelGroup>
  
      <div class="tableControl">
        
          <s:link view="/${listPageName}.xhtml" 
              rendered="${'#'}{${listName}.previousExists}" 
                 value="${'#'}{messages.left}${'#'}{messages.left} First Page"
                    id="firstPage">
            <f:param name="firstResult" value="0"/>
          </s:link>
          
          <s:link view="/${listPageName}.xhtml" 
              rendered="${'#'}{${listName}.previousExists}" 
                 value="${'#'}{messages.left} Previous Page"
                    id="previousPage">
              <f:param name="firstResult" 
                      value="${'#'}{${listName}.previousFirstResult}"/>
          </s:link>
          
          <s:link view="/${listPageName}.xhtml" 
              rendered="${'#'}{${listName}.nextExists}" 
                 value="Next Page ${'#'}{messages.right}"
                    id="nextPage">
              <f:param name="firstResult" 
                      value="${'#'}{${listName}.nextFirstResult}"/>
          </s:link>
          
          <s:link view="/${listPageName}.xhtml" 
              rendered="${'#'}{${listName}.nextExists}" 
                 value="Last Page ${'#'}{messages.right}${'#'}{messages.right}"
                    id="lastPage">
              <f:param name="firstResult" 
                      value="${'#'}{${listName}.lastFirstResult}"/>
          </s:link>
          
      </div>
      
      <s:div styleClass="actionButtons" rendered="${'#'}{empty from}">
          <s:button view="/${editPageName}.xhtml"
                      id="create" 
                   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>
  
  </ui:composition>
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/login.page.xml
  
  Index: login.page.xml
  ===================================================================
  <!DOCTYPE page PUBLIC
            "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
            "http://jboss.com/products/seam/pages-1.2.dtd">
  
  <page>
     <navigation from-action="#{identity.login}">
        <rule if="#{identity.loggedIn}">
           <redirect view-id="/home.xhtml"/>
        </rule>
     </navigation>
  </page>
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/login.xhtml
  
  Index: login.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"
                  template="layout/template.xhtml">
  
  <ui:define name="body">
      
      <h:messages styleClass="message"/>
      
   <ice:form id="login">
        <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
    	  <f:facet name="header">
          	<ice:panelGroup styleClass="expandableStateIndicator">
  			<ice:outputText value="Login"/>
          	</ice:panelGroup>
     	  </f:facet>
              <p>Please login using any username and password</p>
  
                      <div class="dialog">
                          <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
                              <h:outputLabel for="username">Username</h:outputLabel>
                              <h:inputText id="username" 
                                        value="#{identity.username}"/>
                              <h:outputLabel for="password">Password</h:outputLabel>
                              <h:inputSecret id="password" 
                                          value="#{identity.password}"/>
                              <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
                              <h:selectBooleanCheckbox id="rememberMe" 
                                                    value="#{identity.rememberMe}"/>
                          </h:panelGrid>
                      </div>
  
          </ice:panelCollapsible>
           <div class="actionButtons">
              <h:commandButton value="Login" action="#{identity.login}"/>
          </div>
            
      </ice:form>      
  </ui:define> 
  </ui:composition>
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/page.xhtml
  
  Index: page.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns:h="http://java.sun.com/jsf/html"
                  template="layout/template.xhtml">
  
  <ui:define name="body">
  
      <h1>${pageName}</h1>
      <p>Generated page.</p>
  
  </ui:define>
  
  </ui:composition>
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/param.xml.ftl
  
  Index: param.xml.ftl
  ===================================================================
  <#foreach property in pojo.allPropertiesIterator>
  <#if c2h.isManyToOne(property)>
  <#assign parentPojo = c2j.getPOJOClass(cfg.getClassMapping(property.value.referencedEntityName))>
  <#if entities.add(parentPojo.shortName)>
  <#assign parentComponentName = util.lower(parentPojo.shortName)>
  <#assign parentHomeName = parentComponentName + "Home">
     <param name="${parentComponentName}From"/>
  <#assign parentIdName = parentComponentName + util.upper(parentPojo.identifierProperty.name)>
  <#if c2j.isComponent(parentPojo.identifierProperty)>
  <#foreach parentComponentProperty in parentPojo.identifierProperty.value.propertyIterator>
  <#assign parentCidName = parentComponentName + util.upper(parentComponentProperty.name)>
     <param name="${parentCidName}" value="${'#'}{${parentHomeName}.${parentIdName}.${parentComponentProperty.name}}"/>
  </#foreach>
  <#else>
     <param name="${parentIdName}" value="${'#'}{${parentHomeName}.${parentIdName}}"/>
  </#if>
  <#assign p = pojo>
  <#assign pojo = parentPojo>
  <#include "param.xml.ftl">
  <#assign pojo = p>
  </#if>
  </#if>
  </#foreach>
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/query.xhtml
  
  Index: query.xhtml
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"   
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
  
      <h1>@beanName@ results</h1>
      <p>Generated query page</p>
      
      <h:messages globalOnly="true" styleClass="message"/>
      <ice:form>
      <h:outputText value="No results from search" 
              rendered="#{empty @componentName at .resultList}"/>
      <f:subview id="results" rendered="#{not empty @componentName at .resultList}">
          <ice:dataTable id="@componentName@"
                       var="item"
  				columnClasses="allCols"
                       value="#{@componentName at .resultList}">
              <ice:column>
                  <f:facet name="header">Result</f:facet>
                  #{item}
              </ice:column>
          </ice:dataTable>
  
         <div class="tableControl">
              <s:link view="/@pageName at .xhtml"
                      rendered="#{@componentName at .previousExists}"
                      value="&lt;&lt; First Page"
                      id="firstPage">
                  <f:param name="firstResult" value="0"/>
              </s:link>
  
              <s:link view="/@pageName at .xhtml"
                      rendered="#{@componentName at .previousExists}"
                      value="&lt; Previous Page"
                      id="previousPage">
                  <f:param name="firstResult"
                           value="#{@componentName at .previousFirstResult}"/>
              </s:link>
  
              <s:link view="/@pageName at .xhtml"
                      rendered="#{@componentName at .nextExists}"
                      value="Next Page &gt;"
                      id="nextPage">
                  <f:param name="firstResult"
                           value="#{@componentName at .nextFirstResult}"/>
              </s:link>
  
              <s:link view="/@pageName at .xhtml"
                      rendered="#{@componentName at .nextExists}"
                      value="Last Page &gt;&gt;"
                      id="lastPage">
                  <f:param name="firstResult"
                           value="#{@componentName at .lastFirstResult}"/>
              </s:link>
         </div>
  
  
  
  
      </f:subview>
    </ice:form>
  </ui:define>
  
  </ui:composition>
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/view.page.xml.ftl
  
  Index: view.page.xml.ftl
  ===================================================================
  <!DOCTYPE page PUBLIC
            "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
            "http://jboss.com/products/seam/pages-1.2.dtd">
  
  <#assign entityName = pojo.shortName>
  <#assign componentName = util.lower(entityName)>
  <#assign homeName = componentName + "Home">
  <page>
     <param name="${componentName}From"/>
  <#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)>
     <param name="${cidName}" value="${'#'}{${homeName}.${idName}.${componentProperty.name}}"/>
  </#foreach>
  <#else>
     <param name="${idName}" value="${'#'}{${homeName}.${idName}}"/>
  </#if>
  <#assign entities=util.set()>
  <#if entities.add(pojo.shortName)>
  <#include "param.xml.ftl">
  </#if>
  </page>
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/view.xhtml.ftl
  
  Index: view.xhtml.ftl
  ===================================================================
  <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <#assign entityName = pojo.shortName>
  <#assign componentName = util.lower(entityName)>
  <#assign homeName = componentName + "Home">
  <#assign masterPageName = entityName + "List">
  <#assign editPageName = entityName + "Edit">
  
  <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:s="http://jboss.com/products/seam/taglib"
                  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:ice="http://www.icesoft.com/icefaces/component"   
                  template="layout/template.xhtml">
                         
  <ui:define name="body">
      
      <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
      
  
   <ice:panelCollapsible expanded="true" styleClass="pnlClpsblDemo">
      <f:facet name="header">
          <ice:panelGroup styleClass="expandableStateIndicator">
  			    <ice:outputText value="${homeName}"/>
      	  </ice:panelGroup>
      </f:facet>        
        <ice:panelGroup styleClass="prop">
            <ice:panelGrid columns="2" columnClasses="name,value">
  <#foreach property in pojo.allPropertiesIterator>
  <#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
  <#include "viewproperty.xhtml.ftl">
  </#if>
  </#foreach>
  
          <div style="clear:both"/>
  	    </ice:panelGrid>
       </ice:panelGroup>
   </ice:panelCollapsible>
  
      <div class="actionButtons">      
  
          <s:button view="/${editPageName}.xhtml" 
                      id="edit" 
                   value="Edit"/>
  
          <s:button view="/${'#'}{empty ${componentName}From ? '${masterPageName}' : ${componentName}From}.xhtml"
                      id="done"
                   value="Done"/>
  
      </div>
  <#assign hasAssociations=false>
  <#foreach property in pojo.allPropertiesIterator>
  <#if c2h.isManyToOne(property) || c2h.isOneToManyCollection(property)>
  <#assign hasAssociations=true>
  </#if>
  </#foreach>
  
  <#if hasAssociations>
      <ice:form>
         <ice:panelTabSet styleClass="componentPanelTabSetLayout" style="margin-bottom:5px;margin-top:10px;">
  </#if>
  <#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)>
  
  	<ice:panelTab label="${property.name}">
     		<div class="association" id="${property.name}Parent">
          
         		 <h:outputText value="No ${property.name}" 
                     rendered="${'#'}{${homeName}.instance.${property.name} == null}"/>
     
          	<ice:dataTable  var="${parentName}" 
                     value="${'#'}{${homeName}.instance.${property.name}}" 
                  rendered="${'#'}{${homeName}.instance.${property.name} != null}"
                rowClasses="rvgRowOne,rvgRowTwo"
  	        columnClasses="allCols"
                        id="${property.name}Table">
  <#foreach parentProperty in parentPojo.allPropertiesIterator>
  <#if !c2h.isCollection(parentProperty) && !c2h.isManyToOne(parentProperty)>
  <#if parentPojo.isComponent(parentProperty)>
  <#foreach componentProperty in parentProperty.value.propertyIterator>
              <ice:column>
                  <f:facet name="header">${componentProperty.name}</f:facet>
                  ${'#'}{${parentName}.${parentProperty.name}.${componentProperty.name}}
              </ice:column>
  </#foreach>
  <#else>
              <ice:column>
                  <f:facet name="header">${parentProperty.name}</f:facet>
                  ${'#'}{${parentName}.${parentProperty.name}}
              </ice:column>
  </#if>
  </#if>
  <#if c2h.isManyToOne(parentProperty)>
  <#assign parentParentPojo = c2j.getPOJOClass(cfg.getClassMapping(parentProperty.value.referencedEntityName))>
  <#if parentParentPojo.isComponent(parentParentPojo.identifierProperty)>
  <#foreach componentProperty in parentParentPojo.identifierProperty.value.propertyIterator>
              <ice:column>
  	    	    <f:facet name="header">${parentProperty.name} ${componentProperty.name}</f:facet>
  		    	${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}.${componentProperty.name}}
              </ice:column>
  </#foreach>
  <#else>
              <ice:column>
  	    	    <f:facet name="header">${parentProperty.name} ${parentParentPojo.identifierProperty.name}</f:facet>
  		    	${'#'}{${parentName}.${parentProperty.name}.${parentParentPojo.identifierProperty.name}}
              </ice:column>
  </#if>
  </#if>
  </#foreach>
              <ice:column>
                  <f:facet name="header">action</f:facet>
                  <s:link id="view${parentName}" 
                       value="View" 
                        view="/${parentPageName}.xhtml">
  <#if parentPojo.isComponent(parentPojo.identifierProperty)>
  <#foreach componentProperty in parentPojo.identifierProperty.value.propertyIterator>
                      <f:param name="${parentName}${util.upper(componentProperty.name)}" 
                              value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}.${componentProperty.name}}"/>
  </#foreach>
  <#else>
                      <f:param name="${parentName}${util.upper(parentPojo.identifierProperty.name)}" 
                             value="${'#'}{${parentName}.${parentPojo.identifierProperty.name}}"/>
  </#if>
                  </s:link>
              </ice:column>
         </ice:dataTable>
         
      </div>
      </ice:panelTab>
  </#if>
  <#if c2h.isOneToManyCollection(property)>
  
     <ice:panelTab label="${property.name}">
      <div class="association" id="${property.name}Children">
          
  <#assign childPojo = c2j.getPOJOClass(property.value.element.associatedClass)>
  <#assign childPageName = childPojo.shortName>
  <#assign childEditPageName = childPojo.shortName + "Edit">
  <#assign childName = util.lower(childPojo.shortName)>
  <#assign childHomeName = childName + "Home">
          <h:outputText value="No ${property.name}" 
                     rendered="${'#'}{empty ${homeName}.${property.name}}"/>
          
          <ice:dataTable value="${'#'}{${homeName}.${property.name}}" 
                         var="${childName}" 
                    rendered="${'#'}{not empty ${homeName}.${property.name}}" 
                  rowClasses="rvgRowOne,rvgRowTwo"
  		    columnClasses="allCols"
                          id="${property.name}Table">
  <#foreach childProperty in childPojo.allPropertiesIterator>
  <#if !c2h.isCollection(childProperty) && !c2h.isManyToOne(childProperty)>
  <#if childPojo.isComponent(childProperty)>
  <#foreach componentProperty in childProperty.value.propertyIterator>
              <ice:column>
                  <f:facet name="header">${componentProperty.name}</f:facet>
                  ${'#'}{${childName}.${childProperty.name}.${componentProperty.name}}
              </ice:column>
  </#foreach>
  <#else>
              <ice:column>
                  <f:facet name="header">${childProperty.name}</f:facet>
                  <h:outputText value="${'#'}{${childName}.${childProperty.name}}"/>
              </ice:column>
  </#if>
  </#if>
  </#foreach>
              <ice:column>
                  <f:facet name="header">action</f:facet>
                  <s:link id="select${childName}" 
                       value="Select" 
                        view="/${childPageName}.xhtml">
  <#if childPojo.isComponent(childPojo.identifierProperty)>
  <#foreach componentProperty in childPojo.identifierProperty.value.propertyIterator>
                      <f:param name="${childName}${util.upper(componentProperty.name)}" 
                              value="${'#'}{${childName}.${childPojo.identifierProperty.name}.${componentProperty.name}}"/>
  </#foreach>
  <#else>
                      <f:param name="${childName}${util.upper(childPojo.identifierProperty.name)}" 
                              value="${'#'}{${childName}.${childPojo.identifierProperty.name}}"/>
  </#if>
                      <f:param name="${childName}From" value="${entityName}"/>
                  </s:link>
              </ice:column>
          </ice:dataTable>
          
       </div>
      
      <div class="actionButtons">
          <s:button id="add${childName}" 
                 value="Add ${childName}"
                  view="/${childEditPageName}.xhtml">
              <f:param name="${componentName}${util.upper(pojo.identifierProperty.name)}" 
                      value="${'#'}{${homeName}.instance.${pojo.identifierProperty.name}}"/>
              <f:param name="${childName}From" value="${entityName}"/>
          </s:button>
      </div>        
     </ice:panelTab>
  </#if>
  </#foreach>
  <#if hasAssociations>
  </ice:panelTabSet>
  </ice:form>
  </#if> 
  </ui:define>
  
  </ui:composition>
  
  
  
  
  1.1      date: 2007/07/16 00:54:17;  author: myuan;  state: Exp;jboss-seam/seam-gen/icefaces/view/viewproperty.xhtml.ftl
  
  Index: viewproperty.xhtml.ftl
  ===================================================================
  <#if !property.equals(pojo.identifierProperty) || property.value.identifierGeneratorStrategy == "assigned">
  <#if c2j.isComponent(property)>
  <#foreach componentProperty in property.value.propertyIterator>
  <#assign propertyType = componentProperty.value.typeName>
  
                  <ice:outputLabel>${componentProperty.name}</ice:outputLabel>
  <#if propertyType == "date">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                  <s:convertDateTime type="date" dateStyle="short"/>
                </ice:outputText>
  <#elseif propertyType == "time">
               <ice:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                  <s:convertDateTime type="time"/>
               </ice:outputText>
  <#elseif propertyType == "timestamp">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                  <s:convertDateTime type="both" dateStyle="short"/>
              </ice:outputText>
  <#elseif propertyType == "big_decimal">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                  <f:convertNumber/>
              </ice:outputText>
  <#elseif propertyType == "big_integer">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                  <f:convertNumber integerOnly="true"/>
              </ice:outputText>
  <#else>
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"/>
  </#if>
          
  </#foreach>
  <#else>
  <#assign propertyType = property.value.typeName>
  
                    <ice:outputLabel>${property.name}</ice:outputLabel>
  <#if propertyType == "date">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}}">
                  <s:convertDateTime type="date" dateStyle="short"/>
              </ice:outputText>
  <#elseif propertyType == "time">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}}">
                  <s:convertDateTime type="time"/>
              </ice:outputText>
  <#elseif propertyType == "timestamp">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}}">
                  <s:convertDateTime type="both" dateStyle="short"/>
              </ice:outputText>
  <#elseif propertyType == "big_decimal">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}}">
                  <f:convertNumber/>
              </ice:outputText>
  <#elseif propertyType == "big_integer">
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}}">
                  <f:convertNumber integerOnly="true"/>
              </ice:outputText>
  <#else>
              <ice:outputText value="${'#'}{${homeName}.instance.${property.name}}"/>
  
  </#if>
  </#if>
  </#if>
  
  
  



More information about the jboss-cvs-commits mailing list