tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlewissh...@apache.org
Subject cvs commit: jakarta-tapestry/contrib/src/org/apache/tapestry/contrib/valid NumericField.jwc NumericField.java
Date Fri, 12 Dec 2003 05:00:04 GMT
rlewisshell    2003/12/11 21:00:04

  Modified:    web      new.html
               contrib/src/org/apache/tapestry/contrib/valid
                        NumericField.jwc NumericField.java
  Log:
  [ 25462 ] NumericField does not pass on its type parameter
  
  Revision  Changes    Path
  1.206     +2 -1      jakarta-tapestry/web/new.html
  
  Index: new.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/web/new.html,v
  retrieving revision 1.205
  retrieving revision 1.206
  diff -u -r1.205 -r1.206
  --- new.html	11 Dec 2003 04:09:07 -0000	1.205
  +++ new.html	12 Dec 2003 05:00:04 -0000	1.206
  @@ -52,6 +52,7 @@
   [ 24393 ] No JVM requirements mentioned in docs
   [ 24874 ] [PATCH]ValidationStrings_zh_TW.properties
   [ 25117 ] PageService.getLink throws ClassCastException if parameters arg is Object[]
  +[ 25462 ] NumericField does not pass on its type parameter
   </pre>
   
   <h3>Release 3.0-beta-3</h3>
  
  
  
  1.4       +1 -1      jakarta-tapestry/contrib/src/org/apache/tapestry/contrib/valid/NumericField.jwc
  
  Index: NumericField.jwc
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/contrib/src/org/apache/tapestry/contrib/valid/NumericField.jwc,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NumericField.jwc	20 Oct 2003 00:25:54 -0000	1.3
  +++ NumericField.jwc	12 Dec 2003 05:00:04 -0000	1.4
  @@ -1 +1 @@
  -<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!DOCTYPE component-specification
PUBLIC 
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<component-specification
class="org.apache.tapestry.contrib.valid.NumericField">

  <parameter name="disabled"
type="boolean" direction="in"/>
  <parameter name="hidden" type="boolean" direction="in"/>
 <parameter name="displayWidth" type="int" direction="in" />
  <parameter name="maximumLength"
type="int" direction="in" />

  <parameter name="value" type="java.lang.Object" direction="auto"
required="yes"/>
  <parameter name="displayName" type="java.lang.String" direction="auto"
required="yes"/>
  <parameter name="maximum" type="java.lang.Number"/>
  <parameter
name="minimum" type="java.lang.Number"/>
  <parameter name="required"/>
  <parameter
name="type" type="java.lang.String" required="yes" direction="in" property-name="typeName"
/>

  <reserved-parameter name="name"/>
  
  <property-specification name="name"
type="java.lang.String"/>
  <property-specification name="form" type="org.apache.tapestry.IForm"/>

</component-specification>
  \ No newline at end of file
  +<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$ -->
<!DOCTYPE component-specification
PUBLIC 
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<component-specification
class="org.apache.tapestry.contrib.valid.NumericField">

  <parameter name="disabled"
type="boolean" direction="in"/>
  <parameter name="hidden" type="boolean" direction="in"/>
 <parameter name="displayWidth" type="int" direction="in" />
  <parameter name="maximumLength"
type="int" direction="in" />

  <parameter name="value" type="java.lang.Object" direction="auto"
required="yes"/>
  <parameter name="displayName" type="java.lang.String" direction="auto"
required="yes"/>
  <parameter name="maximum" type="java.lang.Number"/>
  <parameter
name="minimum" type="java.lang.Number"/>
  <parameter name="required"/>
  <parameter
name="type" type="java.lang.String" required="yes" direction="in" />

  <reserved-parameter
name="name"/>
  
  <property-specification name="name" type="java.lang.String"/>
 <property-specification name="form" type="org.apache.tapestry.IForm"/>

</component-specification>
  \ No newline at end of file
  
  
  
  1.3       +38 -12    jakarta-tapestry/contrib/src/org/apache/tapestry/contrib/valid/NumericField.java
  
  Index: NumericField.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/contrib/src/org/apache/tapestry/contrib/valid/NumericField.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NumericField.java	17 Oct 2003 18:53:53 -0000	1.2
  +++ NumericField.java	12 Dec 2003 05:00:04 -0000	1.3
  @@ -132,6 +132,16 @@
    *      <td>A textual name for the field that is used when formulating error messages.
    *      </td>
    *  </tr>
  + * 
  + *  <tr>
  + *      <td>type</td>
  + *      <td>String</td>
  + *      <td>R</td>
  + *      <td>yes</td>
  + *      <td>&nbsp;</td>
  + *      <td>The class name used to convert the value entered.  See {@link NumberValidator#setValueType(String)}
  + *      </td>
  + *  </tr>
    *
    *	</table>
    *
  @@ -148,9 +158,10 @@
   {
       private IBinding minimumBinding;
       private IBinding maximumBinding;
  -    private IBinding requiredBinding;
  +	private IBinding requiredBinding;
  +	private IBinding typeBinding;
   
  -    public IBinding getMinimumBinding()
  +	public IBinding getMinimumBinding()
       {
           return minimumBinding;
       }
  @@ -170,15 +181,25 @@
           maximumBinding = value;
       }
   
  -    public IBinding getRequiredBinding()
  -    {
  -        return requiredBinding;
  -    }
  -
  -    public void setRequiredBinding(IBinding requiredBinding)
  -    {
  -        this.requiredBinding = requiredBinding;
  -    }
  +	public IBinding getRequiredBinding()
  +	{
  +		return requiredBinding;
  +	}
  +
  +	public void setRequiredBinding(IBinding requiredBinding)
  +	{
  +		this.requiredBinding = requiredBinding;
  +	}
  +
  +	public IBinding getTypeBinding()
  +	{
  +		return typeBinding;
  +	}
  +
  +	public void setTypeBinding(IBinding typeNameBinding)
  +	{
  +		this.typeBinding = typeNameBinding;
  +	}
   
       /**
        * Overrides {@link ValidField#getValidator()} to construct
  @@ -207,6 +228,11 @@
               validator.setRequired(required);
           }
   
  +        if (typeBinding != null)
  +        {
  +        	validator.setValueType(typeBinding.getString());
  +        }
  +        
           return validator;
       }
   
  
  
  

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


Mime
View raw message