portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portals-bridges/library/velocity/templates preferences-form.vm
Date Thu, 04 Nov 2004 18:11:46 GMT
taylor      2004/11/04 10:11:46

  Added:       portals-bridges/library/project locator.ent
               portals-bridges/library/velocity toolbox.xml
                        velocity.properties
               portals-bridges/library/project/dependencies
                        velocity-deps.xml struts-deps.xml myfaces-deps.xml
                        frameworks-deps.xml
               portals-bridges/library/velocity/macros frameworks-macros.vm
               portals-bridges/library/spring validator-configuration.xml
                        default-portlet-validation.xml
               portals-bridges/library/velocity/templates
                        preferences-form.vm
  Log:
  library of bridges examples, reusable velocity portlet macros, templates, and maven project
configurations
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/portals-bridges/library/project/locator.ent
  
  Index: locator.ent
  ===================================================================
  <!-- Project dependencies -->
  <!ENTITY myfaces SYSTEM "file:./etc/project-dependencies/myfaces-deps.xml">
  <!ENTITY velocity SYSTEM "file:./etc/project-dependencies/velocity-deps.xml">
  <!ENTITY frameworks SYSTEM "file:./etc/project-dependencies/frameworks-deps.xml">
  
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/velocity/toolbox.xml
  
  Index: toolbox.xml
  ===================================================================
  <?xml version="1.0"?>
  <toolbox>
  </toolbox>
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/velocity/velocity.properties
  
  Index: velocity.properties
  ===================================================================
  # Copyright 2004 The Apache Software Foundation
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  # 
  #     http://www.apache.org/licenses/LICENSE-2.0
  # 
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  #----------------------------------------------------------------------------
  # These are the default properties for the
  # Velocity Runtime. These values are used when
  # Runtime.init() is called, and when Runtime.init(properties)
  # fails to find the specificed properties file.
  #----------------------------------------------------------------------------
  
  #----------------------------------------------------------------------------
  # R U N T I M E  L O G  
  #----------------------------------------------------------------------------
  # This is the location of the Velocity Runtime log.
  #----------------------------------------------------------------------------
  
  runtime.log = velocity.log
  
  #----------------------------------------------------------------------------
  # T E M P L A T E  E N C O D I N G
  #----------------------------------------------------------------------------
  
  template.encoding=8859_1
  
  #----------------------------------------------------------------------------
  # C O N T E N T  T Y P E  
  #----------------------------------------------------------------------------
  # This is the default content type for the VelocityServlet.
  #----------------------------------------------------------------------------
  
  default.contentType=text/html
  
  #----------------------------------------------------------------------------
  # F O R E A C H  P R O P E R T I E S
  #----------------------------------------------------------------------------
  # These properties control how the counter is accessed in the #foreach
  # directive. By default the reference $velocityCount will be available
  # in the body of the #foreach directive. The default starting value
  # for this reference is 1.
  #----------------------------------------------------------------------------
  
  counter.name = velocityCount
  counter.initial.value = 1
  
  #----------------------------------------------------------------------------
  # I N C L U D E  P R O P E R T I E S
  #----------------------------------------------------------------------------
  # These are the properties that governed the way #include'd content
  # is governed.
  #----------------------------------------------------------------------------
  
  include.path=.
  include.cache = false
  include.output.errormsg.start = <!-- include error : 
  include.output.errormsg.end   =  see error log -->
  
  #----------------------------------------------------------------------------
  # P A R S E  P R O P E R T I E S
  #----------------------------------------------------------------------------
  
  parse_directive.maxdepth = 10
  
  #----------------------------------------------------------------------------
  # T E M P L A T E  L O A D E R S
  #----------------------------------------------------------------------------
  # 
  # 
  #----------------------------------------------------------------------------
  
  template.loader.1.public.name = File
  template.loader.1.description = Velocity File Template Loader
  template.loader.1.class = org.apache.velocity.runtime.loader.FileTemplateLoader
  template.loader.1.template.path = .
  template.loader.1.cache = false
  template.loader.1.modificationCheckInterval = 2
  
  velocimacro.library.autoreload = true
  velocimacro.permissions.allow.inline.to.replace.global = true
  velocimacro.library = /WEB-INF/VM_global_library.vm, /WEB-INF/velocity/manning-macros.vm
  
  #template.loader.2.public.name = URL
  #template.loader.2.description = Velocity URL Template Loader
  #template.loader.2.class = org.apache.velocity.runtime.loader.URLTemplateLoader
  #template.loader.2.template.path = http://localhost/templates/
  #template.loader.2.cache = false
  
  #----------------------------------------------------------------------------
  # E X T E R N A L  S E R V I C E  I N I T I A L I Z A T I O N
  #----------------------------------------------------------------------------
  # If this property is set to true then an external service will
  # set certain system properties and initialize the Velocity
  # Runtime. This method is used by Turbine to initialize the
  # Velocity Runtime for the TurbineVelocityService.
  #----------------------------------------------------------------------------
  
  external.init = false
  
  
  
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/project/dependencies/velocity-deps.xml
  
  Index: velocity-deps.xml
  ===================================================================
      <dependency>
        <id>velocity</id>
        <version>1.4</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>      
      </dependency>
      <dependency>
        <id>velocity-tools:velocity-tools-view</id>
        <version>1.1-beta1</version>
        <url>http://jakarta.apache.org/velocity</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>      
      </dependency>    
      <dependency>
        <groupId>portals-bridges</groupId>
        <artifactId>portals-bridges-velocity</artifactId>
        <version>0.1</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/project/dependencies/struts-deps.xml
  
  Index: struts-deps.xml
  ===================================================================
      <dependency>
        <groupId>antlr</groupId>
        <artifactId>antlr</artifactId>
        <version>2.7.2</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.7.0</version>
        <url>http://jakarta.apache.org/commons/beanutils/</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>2.1</version>
        <url>http://jakarta.apache.org/commons/collections.html</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>1.5</version>
        <url>http://jakarta.apache.org/commons/digester.html</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.0</version>
        <url>http://jakarta.apache.org/commons/fileupload/</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.0</version>
        <url>http://jakarta.apache.org/commons/lang.html</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-validator</groupId>
        <artifactId>commons-validator</artifactId>
        <version>1.1.3</version>
        <url>http://jakarta.apache.org/commons/validator/</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>oro</groupId>
        <artifactId>oro</artifactId>
        <version>2.0.7</version>
        <url>http://jakarta.apache.org/oro/</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>struts</groupId>
        <artifactId>struts</artifactId>
        <version>1.2.1</version>
        <url>http://jakarta.apache.org/struts/</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
  
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/project/dependencies/myfaces-deps.xml
  
  Index: myfaces-deps.xml
  ===================================================================
      <dependency>
        <groupId>portals-bridges</groupId>
        <artifactId>portals-bridges-myfaces</artifactId>
        <version>0.1</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>myfaces</groupId>
        <artifactId>myfaces-jsf-api</artifactId>
        <version>1.0.7-SNAPSHOT</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>myfaces</groupId>
        <artifactId>myfaces</artifactId>
        <version>1.0.7-SNAPSHOT</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>myfaces</groupId>
        <artifactId>myfaces-components</artifactId>
        <version>1.0.7-SNAPSHOT</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.7.0</version>
        <url>http://jakarta.apache.org/commons/beanutils.html</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.2</version>
        <url>http://jakarta.apache.org/commons/codec/</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>2.1</version>
        <url>http://jakarta.apache.org/commons/collections.html</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>1.5</version>
        <url>http://jakarta.apache.org/commons/digester.html</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>commons-el</groupId>
        <artifactId>commons-el</artifactId>
        <version>1.0</version>
        <url>http://jakarta.apache.org/commons/el/</url>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>jspapi</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.0-20040521</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>         
      
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/project/dependencies/frameworks-deps.xml
  
  Index: frameworks-deps.xml
  ===================================================================
      <dependency>
        <id>springframework:spring-core</id>
        <version>1.1.1</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      <dependency>
        <groupId>portals-bridges</groupId>
        <artifactId>portals-bridges-frameworks</artifactId>
        <version>0.1</version>
        <properties>
          <war.bundle>true</war.bundle>
        </properties>
      </dependency>
      
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/velocity/macros/frameworks-macros.vm
  
  Index: frameworks-macros.vm
  ===================================================================
  #macro (headerCell $body)
    <td>
      <b>     
          $body
      </b>
    </td>
  #end
  
  #macro (entryCell $body)
    <td>    
        $body &nbsp;    
    </td>
  #end
  
  #macro (form4ColumnCell $label $value $size $id)
    <tr colspan="4" align="right">
      <td width="5%" class="portlet-form-label" align="left">&nbsp;</td>
      <td nowrap class="portlet-form-field-label" align="right">$!label:&nbsp;</td>
      <td class="portlet-form-input-field" align="left">
        <input id="$!id" type="text" name="$!id" size="$!size" value="$!value">
      </td>
      <td width="5%" class="portlet-form-label" align="left">&nbsp;</td>
    </tr>
  #end
  
  #macro (Preference $prefs $name)
  #set ($pall = $prefs.get($name))
  #foreach ($x in $pall)
  #set ($extraction = $x)
  #end
  $extraction
  #end
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/spring/validator-configuration.xml
  
  Index: validator-configuration.xml
  ===================================================================
  <!DOCTYPE form-validation PUBLIC
       "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN"
       "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
       
  <form-validation>
     <global>
        <validator name="required"
                   classname="org.apache.portals.bridges.frameworks.spring.validation.ValidationSupport"
                   method="validateRequired"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.required"/>
        <validator name="range"
                   classname="org.apache.portals.bridges.frameworks.spring.validation.ValidationSupport"
                   method="validateRange"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.range"/>
        <validator name="doubleRange"
                   classname="org.apache.portals.bridges.frameworks.spring.validation.ValidationSupport"
                   method="validateDoubleRange"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.range"/>
        <validator name="mask"
                   classname="org.apache.portals.bridges.frameworks.spring.validation.ValidationSupport"
                   method="validateMask"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.mask"/>
                   
     </global>
     <formset>
        <form name="clientInfo">
           <field property="name"  depends="required">
           	   <arg key="nameForm.firstname.displayname"/>
           </field>    
           <field  property="phone" depends="required">
           	     <arg key="nameForm.lastname.displayname"/>
           </field>
           <field  property="email" depends="required">
           	     <arg key="nameForm.street1.displayname"/>
           </field>
           <field  property="stocks" depends="required">
           	     <arg key="nameForm.city.displayname"/>
           </field>
           <field  property="income" depends="required">
           	     <arg key="nameForm.state.displayname"/>
           </field>
           <!--
           <field  property="postalCode" depends="required,mask">
           	     <arg key="nameForm.postalCode.displayname"/>
           	     <var>
           	     	<var-name>mask</var-name>
           	     	<var-value>^[0-9]{5,5}</var-value>
           	     </var>         	     
           </field>
           <field  property="age" depends="required, range">
           	     <arg0 key="nameForm.age.displayname"/>
           	     <arg1 name="min" key="${var:min}" resource='false'/>         	    

           	     <arg2 name="max" key="${var:max}" resource='false'/>         	    
         	     
           	     <var>
           	     	<var-name>min</var-name>
           	     	<var-value>1</var-value>
           	     </var>
           	     <var>
           	     	<var-name>max</var-name>
           	     	<var-value>125</var-value>
           	     </var>         	     
           </field>
           <field  property="era" depends="doubleRange">
           	     <arg0 key="nameForm.era.displayname"/>
           	     <arg1 name="min" key="${var:min}" resource='false'/>         	    

           	     <arg2 name="max" key="${var:max}" resource='false'/>         	    
         	     
           	     <var>
           	     	<var-name>min</var-name>
           	     	<var-value>5.0</var-value>
           	     </var>
           	     <var>
           	     	<var-name>max</var-name>
           	     	<var-value>500.0</var-value>
           	     </var>         	     
           	     
           </field>
  	-->
        </form>
        <form name="symbols">
           <field property="symbols"  depends="required">
           	   <arg key="nameForm.firstname.displayname"/>
           </field>    
  	  </form>            
     </formset>   
  </form-validation>
  
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/spring/default-portlet-validation.xml
  
  Index: default-portlet-validation.xml
  ===================================================================
  <!DOCTYPE form-validation PUBLIC
       "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN"
       "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
       
  <form-validation>
     <global>
        <validator name="required"
                   classname="org.apache.portals.bridges.velocity.validation.ValidationSupport"
                   method="validateRequired"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.required"/>
        <validator name="range"
                   classname="org.apache.portals.bridges.velocity.validation.ValidationSupport"
                   method="validateRange"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.range"/>
        <validator name="doubleRange"
                   classname="org.apache.portals.bridges.velocity.validation.ValidationSupport"
                   method="validateDoubleRange"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.range"/>
        <validator name="mask"
                   classname="org.apache.portals.bridges.velocity.validation.ValidationSupport"
                   method="validateMask"
                   methodParams="java.lang.Object,org.apache.commons.validator.Field"
                   msg="errors.mask"/>
                   
     </global>
     <formset>
        <form name="ValidateBean">
           <field property="firstName"  depends="required">
           	   <arg key="nameForm.firstname.displayname"/>
           </field>    
           <field  property="lastName" depends="required">
           	     <arg key="nameForm.lastname.displayname"/>
           </field>
           <field  property="street1" depends="required">
           	     <arg key="nameForm.street1.displayname"/>
           </field>
           <field  property="state" depends="required">
           	     <arg key="nameForm.city.displayname"/>
           </field>
           <field  property="state" depends="required">
           	     <arg key="nameForm.state.displayname"/>
           </field>
           <field  property="postalCode" depends="required,mask">
           	     <arg key="nameForm.postalCode.displayname"/>
           	     <var>
           	     	<var-name>mask</var-name>
           	     	<var-value>^[0-9]{5,5}</var-value>
           	     </var>         	     
           </field>
           <field  property="age" depends="required, range">
           	     <arg0 key="nameForm.age.displayname"/>
           	     <arg1 name="min" key="${var:min}" resource='false'/>         	    

           	     <arg2 name="max" key="${var:max}" resource='false'/>         	    
         	     
           	     <var>
           	     	<var-name>min</var-name>
           	     	<var-value>1</var-value>
           	     </var>
           	     <var>
           	     	<var-name>max</var-name>
           	     	<var-value>125</var-value>
           	     </var>         	     
           </field>
           <field  property="era" depends="doubleRange">
           	     <arg0 key="nameForm.era.displayname"/>
           	     <arg1 name="min" key="${var:min}" resource='false'/>         	    

           	     <arg2 name="max" key="${var:max}" resource='false'/>         	    
         	     
           	     <var>
           	     	<var-name>min</var-name>
           	     	<var-value>5.0</var-value>
           	     </var>
           	     <var>
           	     	<var-name>max</var-name>
           	     	<var-value>500.0</var-value>
           	     </var>         	     
           	     
           </field>
  
        </form>
     </formset>   
  </form-validation>
  
  
  
  1.1                  jakarta-jetspeed-2/portals-bridges/library/velocity/templates/preferences-form.vm
  
  Index: preferences-form.vm
  ===================================================================
  
  <form action="$renderResponse.createActionURL()" method="post">
  <table>
  #foreach ($pref in $prefs.iterator())
  #form4ColumnCell($MESSAGES.getString('$pref.Name'-displayname) "$pref.Value" "40" "$pref.Name")
  </table>
  #end
  <input type="submit" name="Save" value="$MESSAGES.getString("save")" />
  </form>
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message