Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

i need to confirm a field only contain double  RSS feed

 
sam liya
Ranch Hand
Posts: 1246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsf page.i need to confirm one filed only contain double value.how to validate this?
i checked and found there is a validateDoubleRange,but its not suitable for this.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF pages displayed on the client are no longer JSF. They are HTML. HTML is text. Thus there will never be a double value in the field on the page.

In the backing bean, the backing bean's properties can be of any datatype you specify when you declare them. Since HTML wants to handle their text equivalents, it uses Converters to transform them from their native binary forms to text and back again. Primitive items such as int, double, and String have built-in converters. More complex ones such as DateTime are also standard but have to be explicitly requested in the View Template. For user-defined objects, you have to provide a user-defined converter.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!