Hi,

I'm using tapestry 4 beta 6 and I have an issue using numeric
validated/translated numbers. When I enter a zero valid, it gets saved
just fine, but when I bring the page back up, it shows nothing, where
I would like it to show '0' in my textfield.

Here is my component spec:

    <component id="inputStock" type="TextField">
        <binding name="displayName" value="literal:Op voorraad"></binding>  
        <binding name="translator"
value="translator:number,pattern=0"/>
        <binding name="validators" value="validators:required,min=0"/>
        <binding name="value" value="ognl:item.stock"/>
    </component> 

I use zero because I read this in the javadoc for DecimalFormat:

Symbol  Location        Localized?      Meaning
0       Number  Yes     Digit
#       Number  Yes     Digit, zero shows as absent

Second question: is there a way to let tapestry check wheter a whole
number is entered, using the new validator framework? So when I enter
1.5 gives an error.

Regards,
Wouter de Vaal

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to