You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Nuno Sousa <wi...@gmail.com> on 2008/05/30 16:55:58 UTC

Using decimal values with commas on inputTexts

Hi,
If i use "." like 5.7 it works fine.
But if i use a comma like 5,7 it gives me an warning and does nothing

[b]Message:[/b]
15:29:53,550 INFO  [lifecycle] WARNING: FacesMessage(s) have been
enqueued, but may not have been displayed.
sourceId=iceform:j_id33:1:input1[severity=(ERROR 2),
summary=(iceform:j_id33:1:input1: '5,7' must be a signed decimal
number.), detail=(iceform:j_id33:1:input1: '5,7' must be a signed
decimal number consisting of zero or more digits, that may be followed
by a decimal point and fraction.  Example: 198.23 )]

How can i solve use a comma, using a converter? Thanks

-- 
Ping is just a number timming is everything

Re: Using decimal values with commas on inputTexts

Posted by Nuno Sousa <wi...@gmail.com>.
Ok sorry,
I tried with firefox and IE changing language on both and nothing.


On Fri, May 30, 2008 at 3:55 PM, Nuno Sousa <wi...@gmail.com> wrote:
> Hi,
> If i use "." like 5.7 it works fine.
> But if i use a comma like 5,7 it gives me an warning and does nothing
>
> [b]Message:[/b]
> 15:29:53,550 INFO  [lifecycle] WARNING: FacesMessage(s) have been
> enqueued, but may not have been displayed.
> sourceId=iceform:j_id33:1:input1[severity=(ERROR 2),
> summary=(iceform:j_id33:1:input1: '5,7' must be a signed decimal
> number.), detail=(iceform:j_id33:1:input1: '5,7' must be a signed
> decimal number consisting of zero or more digits, that may be followed
> by a decimal point and fraction.  Example: 198.23 )]
>
> How can i solve use a comma, using a converter? Thanks
>
> --
> Ping is just a number timming is everything
>



-- 
Ping is just a number timming is everything

Re: Using decimal values with commas on inputTexts

Posted by simon <si...@chello.at>.
Try setting the language in your browser. For example, for firefox2.x
choose edit|preferences|advanced|general.

And please don't top-post an response to an email when someone has
already used bottom-posting. It's rude.

Regards, Simon

On Fri, 2008-05-30 at 17:02 +0100, Nuno Sousa wrote:
> I'm from Portugal, i tried to set default local to en and to pt_BR in
> my faces-config:
> 
> <faces-config>
> 
> 	<application>
> 		<locale-config>
> 			<default-locale>pt_BR</default-locale>
>       		<supported-locale>en</supported-locale>
>       		<supported-locale>pt_BR</supported-locale>
> 		</locale-config>
> 		<view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
> 	</application>
> 
> </faces-config>
> 
> But the problem remains.
> 
> 
> 
> On Fri, May 30, 2008 at 4:07 PM, simon.kitching@chello.at
> <si...@chello.at> wrote:
> > Nuno Sousa schrieb:
> >> Hi,
> >> If i use "." like 5.7 it works fine.
> >> But if i use a comma like 5,7 it gives me an warning and does nothing
> >>
> >> [b]Message:[/b]
> >> 15:29:53,550 INFO  [lifecycle] WARNING: FacesMessage(s) have been
> >> enqueued, but may not have been displayed.
> >> sourceId=iceform:j_id33:1:input1[severity=(ERROR 2),
> >> summary=(iceform:j_id33:1:input1: '5,7' must be a signed decimal
> >> number.), detail=(iceform:j_id33:1:input1: '5,7' must be a signed
> >> decimal number consisting of zero or more digits, that may be followed
> >> by a decimal point and fraction.  Example: 198.23 )]
> >>
> >> How can i solve use a comma, using a converter? Thanks
> >>
> >>
> > I presume you're in a locale like Germany, where "," is the decimal
> > separator and "." is the thousands separator?
> >
> > If the locale for the current user is set correctly, then the characters
> > are interpreted correctly. If you're finding that JSF is interpreting
> > numbers in English style then the user's locale is probably English.
> >
> > Regards,
> > Simon
> >
> >
> 
> 
> 


Re: Using decimal values with commas on inputTexts

Posted by Nuno Sousa <wi...@gmail.com>.
I'm from Portugal, i tried to set default local to en and to pt_BR in
my faces-config:

<faces-config>

	<application>
		<locale-config>
			<default-locale>pt_BR</default-locale>
      		<supported-locale>en</supported-locale>
      		<supported-locale>pt_BR</supported-locale>
		</locale-config>
		<view-handler>com.icesoft.faces.facelets.D2DSeamFaceletViewHandler</view-handler>
	</application>

</faces-config>

But the problem remains.



On Fri, May 30, 2008 at 4:07 PM, simon.kitching@chello.at
<si...@chello.at> wrote:
> Nuno Sousa schrieb:
>> Hi,
>> If i use "." like 5.7 it works fine.
>> But if i use a comma like 5,7 it gives me an warning and does nothing
>>
>> [b]Message:[/b]
>> 15:29:53,550 INFO  [lifecycle] WARNING: FacesMessage(s) have been
>> enqueued, but may not have been displayed.
>> sourceId=iceform:j_id33:1:input1[severity=(ERROR 2),
>> summary=(iceform:j_id33:1:input1: '5,7' must be a signed decimal
>> number.), detail=(iceform:j_id33:1:input1: '5,7' must be a signed
>> decimal number consisting of zero or more digits, that may be followed
>> by a decimal point and fraction.  Example: 198.23 )]
>>
>> How can i solve use a comma, using a converter? Thanks
>>
>>
> I presume you're in a locale like Germany, where "," is the decimal
> separator and "." is the thousands separator?
>
> If the locale for the current user is set correctly, then the characters
> are interpreted correctly. If you're finding that JSF is interpreting
> numbers in English style then the user's locale is probably English.
>
> Regards,
> Simon
>
>



-- 
Ping is just a number timming is everything

Re: Using decimal values with commas on inputTexts

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Nuno Sousa schrieb:
> Hi,
> If i use "." like 5.7 it works fine.
> But if i use a comma like 5,7 it gives me an warning and does nothing
>
> [b]Message:[/b]
> 15:29:53,550 INFO  [lifecycle] WARNING: FacesMessage(s) have been
> enqueued, but may not have been displayed.
> sourceId=iceform:j_id33:1:input1[severity=(ERROR 2),
> summary=(iceform:j_id33:1:input1: '5,7' must be a signed decimal
> number.), detail=(iceform:j_id33:1:input1: '5,7' must be a signed
> decimal number consisting of zero or more digits, that may be followed
> by a decimal point and fraction.  Example: 198.23 )]
>
> How can i solve use a comma, using a converter? Thanks
>
>   
I presume you're in a locale like Germany, where "," is the decimal
separator and "." is the thousands separator?

If the locale for the current user is set correctly, then the characters
are interpreted correctly. If you're finding that JSF is interpreting
numbers in English style then the user's locale is probably English.

Regards,
Simon