This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Dynamic Validation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Dynamic Validation?" Watch "Dynamic Validation?" New topic
Author

Dynamic Validation?

Dudley Dawson
Ranch Hand

Joined: Dec 14, 2004
Posts: 57
Hi- Is it possible to do something like this:


No matter what i enter, the validator says that the value is not within the expected range 0.0 to 0.0, I guess that bean.minimum and bean.maximum are resolving to null. If I dump my entire list of beans to the page, I can see they are definitely not null. Can these properties be used in this way?

Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Did you define public double getMaximum() and getMinimum methods on your backing bean? What do they return when called?


Customer surveys are for companies who didn't pay proper attention to begin with.
Dudley Dawson
Ranch Hand

Joined: Dec 14, 2004
Posts: 57
Originally posted by Tim Holloway:
Did you define public double getMaximum() and getMinimum methods on your backing bean? What do they return when called?


Thanks Tim.
yes, I've defined them in the bean. If I put the following code on the page:
<hutputText value="#{beanlist}"/>
I've defined bean.toString() to call getMaximum() and getMinimum(), and I can see the that values are not null by accessing them in this fashion. Is there possible some problem with the rendering order? ie- validators are set before the bean values are populated, etc?
[ September 05, 2007: Message edited by: Dudley Dawson ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic Validation?
 
Similar Threads
Problem with submit()
JSF ValueChange problems and Default method where the form submits to
How to handle a list in JSF 2
problem with findComponent()
How to determine which dataTable row was selected