File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes validateDoubleRange - dynamic min and max attributes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "validateDoubleRange - dynamic min and max attributes" Watch "validateDoubleRange - dynamic min and max attributes" New topic
Author

validateDoubleRange - dynamic min and max attributes

J Haley
Ranch Hand

Joined: Jul 22, 2004
Posts: 66
I�m trying to use validateDoubleRange with an inputText. I seem to have a problem when the minimum and maximum ranges are pulled from my bean. I think I should be able to get around this by using a binding attribute with f:validateDoubleRange. I�m not clear on how to this.

Works, but I need to build min and max dynamically


Does not work. Thinks range is from 0 to 0


Think this may work, but not clear on how binding method in bean would look.
Arun Sudharsanam
Greenhorn

Joined: May 29, 2008
Posts: 21
Consider this part of code:

<h:inputText value="#{quote.amount}" required="true"><f:validateDoubleRange minimum="#{bean.min}" maximum="#{bean.min}" ></f:validateDoubleRange></h:inputText>


You have coded minimum and maximum with same bean variables.
Dont know whether its a typo error or its how you have implemented.


A S
J Haley
Ranch Hand

Joined: Jul 22, 2004
Posts: 66
It was a typo. My min and max values are pointing to different bean values. I guess my main question is how to do this with a binding.
 
Don't get me started about those stupid light bulbs.
 
subject: validateDoubleRange - dynamic min and max attributes