JSF Number Validation

后端 未结 5 1900
独厮守ぢ
独厮守ぢ 2021-02-18 18:07

Is there any inbuilt number validator tag in JSF that checks whether an input entered in h:inputext field is a number?

The first question was answered. Edit

5条回答
  •  太阳男子
    2021-02-18 18:56

    i8taken solution converts number into long without validation message (at least in my case: JSF2 / global messages per page). For proper validation message you can
    1. check value in action method in bean;
    or
    2. use converter attribute for inputText:

提交回复
热议问题