You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Samppa Saarela <Sa...@cs.Helsinki.FI> on 2004/11/30 15:40:20 UTC

Null error with NumberValidator

FYI:

I have an int-type property, which I try to edit using ValidField and 
NumberValidator configured as follows:

<bean name="intValueValidator" 
class="org.apache.tapestry.valid.NumberValidator">
    <set-property name="required" expression="false"/>
    <set-property name="minimum" expression="0"/>
    <set-property name="valueType">"int"</set-property>
    <set-property name="zeroIsNull" expression="true"/>
</bean>

Submitting an empty string leads to java.lang.NoSuchMethodException 
since it is trying to call "setIntValue(null)". The zeroIsNull -option 
makes no difference. In practice this exception can be avoided by 
setting the validators required property to true, but maybe the system 
could also be prepared for this kind of situation. NumberValidator could 
for example record "Empty value not allowed for..."-exception to the 
delegate.

-Samppa


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


Sending Form data to an external page

Posted by dw...@vigilantms.com.
What is the best way to send form data to an external page.  I'm trying to
set up a form to take the items out of a shopping cart and post them to a
PayPal cart, which expects specified parameters.    According to chapter 8
in TIA, the RedirectionException should send the request parameters by
calling the RequestDispatcher and invoking the forward() method, but they
don't seem to be sent.   

Also,  Is there a way to control the "name" field of the hidden component so
that the field matches what PayPal expects and not the name the framework
generates?

David Moran



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