• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

validateDoubleRange - dynamic min and max attributes

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
J Haley
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Destiny's powerful hand has made the bed of my future. And this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic