servlets struts hibernate spring maven java

JSF <h:validateDoubleRange> Tag

It is utilized to check that the value of an input field is inside a specific range or not. The value must buoy indicate or convertible gliding point.

<f:validateDoubleRange> TagAttributes

Attribute Description
minimum It is utilized to set least an value for this component.
maximum It is utilized to set most extreme value for this component.
In this example, we are validating user input of double type within specified range. This program will report an error message if input does not validate. In this model, we are validating client contribution of twofold kind inside determined range. This program will report a error message whenever info does not validate.


  1. import javax.faces.bean.ManagedBean;  
  2. import javax.faces.bean.RequestScoped;  
  3. @ManagedBean  
  4. @RequestScoped  
  5. public class User{  
  6. double amount;  
  7. public double getAmount() {  
  8. return amount;  
  9. }  
  11. public void setAmount(double amount) {  
  12. this.amount = amount;  
  13. }  
  14. }  

// response.xhtml

  1. <h:body>  
  2. <f:view locale="fr">  
  3. Amount entered by you: <h:outputText id = "user-name-id" value="#{user.amount}">  
  4. </h:outputText>  
  5. </f:view>  
  6. </h:body>  


// index page

© Javacodegeeks © 2019 - 2019
All Right Reserved and you agree to have read and accepted our term and condition.

Python 3