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

Peter Muir peter at bleepbleep.org.uk
Wed Nov 21 09:24:01 EST 2007


  User: pmuir   
  Date: 07/11/21 09:24:01

  Modified:    seam-gen/icefaces/view     editproperty.xhtml.ftl
                        viewproperty.xhtml.ftl list.xhtml.ftl
                        list.page.xml.ftl
  Log:
  JBSEAM-2282
  
  Revision  Changes    Path
  1.4       +16 -16    jboss-seam/seam-gen/icefaces/view/editproperty.xhtml.ftl
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: editproperty.xhtml.ftl
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/seam-gen/icefaces/view/editproperty.xhtml.ftl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- editproperty.xhtml.ftl	15 Sep 2007 02:30:00 -0000	1.3
  +++ editproperty.xhtml.ftl	21 Nov 2007 14:24:01 -0000	1.4
  @@ -1,14 +1,15 @@
  +<#include "../../util/TypeInfo.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:decorate id="${componentProperty.name}Decoration" template="layout/edit.xhtml">
                   <ui:define name="label">${componentProperty.name}</ui:define>
  -<#if propertyType == "date">
  +<#if isDate(componentProperty)>
                           <ice:selectInputDate id="${componentProperty.name}Id" 
                                 renderAsPopup="true"
   <#if propertyIsId>
  @@ -20,7 +21,7 @@
                             value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">                                         value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                                   
                              </ice:selectInputDate>
  -<#elseif propertyType == "time">
  +<#elseif isTime(componentProperty)>
                           <ice:inputText id="${componentProperty.name}Id" 
                                      size="5"
   <#if !column.nullable>
  @@ -29,7 +30,7 @@
                                value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                       <s:convertDateTime type="time"/>
                           </ice:inputText>
  -<#elseif propertyType == "timestamp">
  +<#elseif isTimestamp(componentProperty)>
                           <ice:inputText id="${componentProperty.name}Id" 
                                      size="16"
   <#if !column.nullable>
  @@ -38,7 +39,7 @@
                                     value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                                <s:convertDateTime type="both" dateStyle="short"/>
                           </ice:inputText>
  -<#elseif propertyType == "big_decimal">
  +<#elseif isBigDecimal(componentProperty)>
                           <ice:inputText id="${componentProperty.name}Id" 
                                 partialSubmit="true"
   <#if !column.nullable>
  @@ -47,7 +48,7 @@
                             value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
                              size="${column.precision+7}">
                           </ice:inputText>
  -<#elseif propertyType == "big_integer">
  +<#elseif isBigInteger(componentProperty)>
                           <ice:inputText id="${componentProperty.name}Id" 
   					partialSubmit="true"
   <#if propertyIsId>
  @@ -59,7 +60,7 @@
                             value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"
                              size="${column.precision+6}">
                           </ice:inputText>
  -<#elseif propertyType == "boolean" || propertyType == "yes_no" || propertyType == "true_false">
  +<#elseif isBoolean(componentProperty)>
                    <h:selectBooleanCheckbox id="${componentProperty.name}"
   <#if !column.nullable>
                                       required="true"
  @@ -68,7 +69,7 @@
                                       disabled="${'#'}{${homeName}.managed}"
   </#if>
                                          value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}"/>
  -<#elseif propertyType == "string">
  +<#elseif isString(componentProperty)>
   <#if column.length gt 160>
   <#if column.length gt 800>
   <#assign rows = 10>
  @@ -120,11 +121,10 @@
   </#foreach>
   <#else>
   <#assign column = property.columnIterator.next()>
  -<#assign propertyType = property.value.typeName>
   
               <s:decorate id="${property.name}Decoration" template="layout/edit.xhtml">
                   <ui:define name="label">${property.name}</ui:define>
  -<#if propertyType == "date">
  +<#if isDate(property)>
                              <ice:selectInputDate id="${property.name}Id" 
                                 renderAsPopup="true"
   
  @@ -136,7 +136,7 @@
   </#if>
                                     value="${'#'}{${homeName}.instance.${property.name}}">
                            </ice:selectInputDate>
  -<#elseif propertyType == "time">
  +<#elseif isTime(property)>
                           <ice:inputText id="${property.name}Id" 
                                      size="5"
   					partialSubmit="true"
  @@ -146,7 +146,7 @@
                                     value="${'#'}{${homeName}.instance.${property.name}}">
                               <s:convertDateTime type="time"/>
                           </ice:inputText>
  -<#elseif propertyType == "timestamp">
  +<#elseif isTimestamp(property)>
                           <ice:inputText id="${property.name}Id" 
                                        size="16"
   			    partialSubmit="true"
  @@ -156,7 +156,7 @@
                                      value="${'#'}{${homeName}.instance.${property.name}}">
                               <s:convertDateTime type="both" dateStyle="short"/>
                           </ice:inputText>
  -<#elseif propertyType == "big_decimal">
  +<#elseif isBigDecimal(property)>
                           <ice:inputText id="${property.name}Id" 
   			    partialSubmit="true"
   <#if !column.nullable>
  @@ -165,7 +165,7 @@
                                       value="${'#'}{${homeName}.instance.${property.name}}"
                                        size="${column.precision+7}">
                           </ice:inputText>
  -<#elseif propertyType == "big_integer">
  +<#elseif isBigInteger(property)>
                           <ice:inputText id="${property.name}Id"
   			                partialSubmit="true"
   <#if propertyIsId>
  @@ -176,7 +176,7 @@
   </#if>
                             value="${'#'}{${homeName}.instance.${property.name}}"
                              size="${column.precision+6}"/>
  -<#elseif propertyType == "boolean" || propertyType == "yes_no" || propertyType == "true_false">
  +<#elseif isBoolean(property)>
                           <ice:selectBooleanCheckbox id="${property.name}Id"
   					partialSubmit="true"
   <#if !column.nullable>
  @@ -186,7 +186,7 @@
                                      disabled="${'#'}{${homeName}.managed}"
   </#if>
                                         value="${'#'}{${homeName}.instance.${property.name}}"/>
  -<#elseif propertyType == "string">
  +<#elseif isString(property)>
   <#if column.length gt 160>
   <#if column.length gt 800>
   <#assign rows = 10>
  
  
  
  1.4       +12 -12    jboss-seam/seam-gen/icefaces/view/viewproperty.xhtml.ftl
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: viewproperty.xhtml.ftl
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/seam-gen/icefaces/view/viewproperty.xhtml.ftl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- viewproperty.xhtml.ftl	15 Sep 2007 02:30:00 -0000	1.3
  +++ viewproperty.xhtml.ftl	21 Nov 2007 14:24:01 -0000	1.4
  @@ -1,31 +1,32 @@
  +<#include "../../util/TypeInfo.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>
   
           <s:decorate id="${componentProperty.name}" template="layout/display.xhtml">
               <ui:define name="label">${componentProperty.name}</ui:define>
  -<#if propertyType == "date">
  +<#if isDate(componentProperty)>
               <ice:outputText id="view${componentProperty.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                   <s:convertDateTime type="date" dateStyle="short"/>
               </ice:outputText>
  -<#elseif propertyType == "time">
  +<#elseif isTime(componentProperty)>
                <ice:outputText id="view${componentProperty.name}TextId" 
   	                  value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                   <s:convertDateTime type="time"/>
                </ice:outputText>
  -<#elseif propertyType == "timestamp">
  +<#elseif isTimestamp(componentProperty)>
               <ice:outputText id="view${componentProperty.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                   <s:convertDateTime type="both" dateStyle="short"/>
               </ice:outputText>
  -<#elseif propertyType == "big_decimal">
  +<#elseif isBigDecimal(componentProperty)>
               <ice:outputText id="view${componentProperty.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                   <f:convertNumber/>
               </ice:outputText>
  -<#elseif propertyType == "big_integer">
  +<#elseif isBigInteger(componentProperty)>
               <ice:outputText id="view${componentProperty.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}.${componentProperty.name}}">
                   <f:convertNumber integerOnly="true"/>
  @@ -36,31 +37,30 @@
           </s:decorate>
   </#foreach>
   <#else>
  -<#assign propertyType = property.value.typeName>
   
           <s:decorate id="${property.name}" template="layout/display.xhtml">
               <ui:define name="label">${property.name}</ui:define>
  -<#if propertyType == "date">
  +<#if isDate(property)>
               <ice:outputText id="view${property.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}}">
                   <s:convertDateTime type="date" dateStyle="short"/>
               </ice:outputText>
  -<#elseif propertyType == "time">
  +<#elseif isTime(property)>
               <ice:outputText id="view${property.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}}">
                   <s:convertDateTime type="time"/>
               </ice:outputText>
  -<#elseif propertyType == "timestamp">
  +<#elseif isTimestamp(property)>
               <ice:outputText id="view${property.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}}">
                   <s:convertDateTime type="both" dateStyle="short"/>
               </ice:outputText>
  -<#elseif propertyType == "big_decimal">
  +<#elseif isBigDecimal(property)>
               <ice:outputText id="view${property.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}}">
                   <f:convertNumber/>
               </ice:outputText>
  -<#elseif propertyType == "big_integer">
  +<#elseif isBigInteger(property)>
               <ice:outputText id="view${property.name}TextId"
   	                 value="${'#'}{${homeName}.instance.${property.name}}">
                   <f:convertNumber integerOnly="true"/>
  
  
  
  1.4       +4 -2      jboss-seam/seam-gen/icefaces/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/icefaces/view/list.xhtml.ftl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- list.xhtml.ftl	15 Sep 2007 02:30:00 -0000	1.3
  +++ list.xhtml.ftl	21 Nov 2007 14:24:01 -0000	1.4
  @@ -1,5 +1,7 @@
   <!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 = util.lower(entityName)>
   <#assign listName = componentName + "List">
  @@ -34,7 +36,7 @@
   <#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
   <#if c2j.isComponent(property)>
   <#foreach componentProperty in property.value.propertyIterator>
  -<#if componentProperty.value.typeName == "string">
  +<#if isString(componentProperty)>
               <s:decorate id="${componentProperty.name}decId" template="layout/display.xhtml">
                   <ui:define name="label">${componentProperty.name}</ui:define>
                     <ice:inputText id="${componentProperty.name}TextId" 
  @@ -45,7 +47,7 @@
   </#if>
   </#foreach>
   <#else>
  -<#if property.value.typeName == "string">
  +<#if isString(property)>
               <s:decorate id="${property.name}decId" template="layout/display.xhtml">
                   <ui:define name="label">${property.name}</ui:define>
                   <ice:inputText id="list${property.name}TextId" 
  
  
  
  1.4       +3 -2      jboss-seam/seam-gen/icefaces/view/list.page.xml.ftl
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: list.page.xml.ftl
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/seam-gen/icefaces/view/list.page.xml.ftl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- list.page.xml.ftl	15 Sep 2007 02:30:00 -0000	1.3
  +++ list.page.xml.ftl	21 Nov 2007 14:24:01 -0000	1.4
  @@ -7,6 +7,7 @@
         xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd">
   
         
  +<#include "../../util/TypeInfo.ftl">
   
   <#assign entityName = pojo.shortName>
   <#assign componentName = util.lower(entityName)>
  @@ -19,12 +20,12 @@
   <#if !c2h.isCollection(property) && !c2h.isManyToOne(property)>
   <#if c2j.isComponent(property)>
   <#foreach componentProperty in property.value.propertyIterator>
  -<#if componentProperty.value.typeName == "string">
  +<#if isString(componentProperty)>
      <param name="${componentProperty.name}" value="${'#'}{${listName}.${componentName}.${property.name}.${componentProperty.name}}"/>
   </#if>
   </#foreach>
   <#else>
  -<#if property.value.typeName == "string">
  +<#if isString(property)>
      <param name="${property.name}" value="${'#'}{${listName}.${componentName}.${property.name}}"/>
   </#if>
   </#if>
  
  
  



More information about the jboss-cvs-commits mailing list