You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Pedro Garcia <pe...@gmail.com> on 2006/05/26 19:19:02 UTC

Help with InputValidation

hi it's me again.
Thought I had solved the problem with number but now every float number is
losing the decimal digits that are after the comma.
For example when I post 10,55 in the client browser. I m receiving 10.00 on
the server.
Can anyone help me with this?
Thanks
Pedro


---------- Forwarded message ----------
From: Pedro Garcia <pe...@gmail.com>
Date: May 25, 2006 3:31 PM
Subject: Fwd: InputValidation
To: Tapestry users <ta...@jakarta.apache.org>

Hi,
I am writing just to tell that I found the solution. That problem was that I
was looking at the wrong place.

    <component id="fieldQuantidade" type="TextField">
        <binding name="value" value="ognl: proposta.quantidade"/>
        <binding name="displayName" value="literal:Quantidade"/>
        <binding name="translator" value="translator:number"/>
        <binding name="validators" value="validators:required"/>
    </component>

Thanks for the attention
Pedro


---------- Forwarded message ----------
From: Pedro Garcia
Date: May 25, 2006 11:33 AM
Subject: InputValidation
To: Tapestry users <ta...@jakarta.apache.org>

Hi,
I'm using Tapestry 4 and I am having a hard time with number inputvalidation
with TextField component.
Can anyone tell me
how to check if the value is an Integer and
how to check if the value is a Float and
how to check if the value is a Double.

and how to set the decimal separator to be a ',' .

Thanks,
Pedro da Silva Garcia


-- 
Atenciosamente,
Pedro da Silva Garcia


-- 
Atenciosamente,
Pedro da Silva Garcia

Re: Help with InputValidation

Posted by Pedro Garcia <pe...@gmail.com>.
Thanks

On 5/26/06, Shing Hing Man <ma...@yahoo.com> wrote:
>
> In the translator, try addding a pattern :
>
>   <binding name="translator" value="translator:number,
> pattern=#.#"/>
>
>
> Shing
>
>
> --- Pedro Garcia <pe...@gmail.com> wrote:
>
> > hi it's me again.
> > Thought I had solved the problem with number but now
> > every float number is
> > losing the decimal digits that are after the comma.
> > For example when I post 10,55 in the client browser.
> > I m receiving 10.00 on
> > the server.
> > Can anyone help me with this?
> > Thanks
> > Pedro
> >
> >
> > ---------- Forwarded message ----------
> > From: Pedro Garcia <pe...@gmail.com>
> > Date: May 25, 2006 3:31 PM
> > Subject: Fwd: InputValidation
> > To: Tapestry users
> > <ta...@jakarta.apache.org>
> >
> > Hi,
> > I am writing just to tell that I found the solution.
> > That problem was that I
> > was looking at the wrong place.
> >
> >     <component id="fieldQuantidade"
> > type="TextField">
> >         <binding name="value" value="ognl:
> > proposta.quantidade"/>
> >         <binding name="displayName"
> > value="literal:Quantidade"/>
> >         <binding name="translator"
> > value="translator:number"/>
> >         <binding name="validators"
> > value="validators:required"/>
> >     </component>
> >
> > Thanks for the attention
> > Pedro
> >
> >
> > ---------- Forwarded message ----------
> > From: Pedro Garcia
> > Date: May 25, 2006 11:33 AM
> > Subject: InputValidation
> > To: Tapestry users
> > <ta...@jakarta.apache.org>
> >
> > Hi,
> > I'm using Tapestry 4 and I am having a hard time
> > with number inputvalidation
> > with TextField component.
> > Can anyone tell me
> > how to check if the value is an Integer and
> > how to check if the value is a Float and
> > how to check if the value is a Double.
> >
> > and how to set the decimal separator to be a ',' .
> >
> > Thanks,
> > Pedro da Silva Garcia
> >
> >
> > --
> > Atenciosamente,
> > Pedro da Silva Garcia
> >
> >
> > --
> > Atenciosamente,
> > Pedro da Silva Garcia
> >
>
> Home page :
>   http://uk.geocities.com/matmsh/index.html
>
>
>
> ___________________________________________________________
> Try the all-new Yahoo! Mail. "The New Version is radically easier to use"
> – The Wall Street Journal
> http://uk.docs.yahoo.com/nowyoucan.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Atenciosamente,
Pedro da Silva Garcia

Re: Help with InputValidation

Posted by Shing Hing Man <ma...@yahoo.com>.
In the translator, try addding a pattern :

  <binding name="translator" value="translator:number,
pattern=#.#"/>


Shing 


--- Pedro Garcia <pe...@gmail.com> wrote:

> hi it's me again.
> Thought I had solved the problem with number but now
> every float number is
> losing the decimal digits that are after the comma.
> For example when I post 10,55 in the client browser.
> I m receiving 10.00 on
> the server.
> Can anyone help me with this?
> Thanks
> Pedro
> 
> 
> ---------- Forwarded message ----------
> From: Pedro Garcia <pe...@gmail.com>
> Date: May 25, 2006 3:31 PM
> Subject: Fwd: InputValidation
> To: Tapestry users
> <ta...@jakarta.apache.org>
> 
> Hi,
> I am writing just to tell that I found the solution.
> That problem was that I
> was looking at the wrong place.
> 
>     <component id="fieldQuantidade"
> type="TextField">
>         <binding name="value" value="ognl:
> proposta.quantidade"/>
>         <binding name="displayName"
> value="literal:Quantidade"/>
>         <binding name="translator"
> value="translator:number"/>
>         <binding name="validators"
> value="validators:required"/>
>     </component>
> 
> Thanks for the attention
> Pedro
> 
> 
> ---------- Forwarded message ----------
> From: Pedro Garcia
> Date: May 25, 2006 11:33 AM
> Subject: InputValidation
> To: Tapestry users
> <ta...@jakarta.apache.org>
> 
> Hi,
> I'm using Tapestry 4 and I am having a hard time
> with number inputvalidation
> with TextField component.
> Can anyone tell me
> how to check if the value is an Integer and
> how to check if the value is a Float and
> how to check if the value is a Double.
> 
> and how to set the decimal separator to be a ',' .
> 
> Thanks,
> Pedro da Silva Garcia
> 
> 
> -- 
> Atenciosamente,
> Pedro da Silva Garcia
> 
> 
> -- 
> Atenciosamente,
> Pedro da Silva Garcia
> 

Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The Wall Street Journal 
http://uk.docs.yahoo.com/nowyoucan.html

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