How to customize JSF conversion message 'must be a number consisting of one or more digits'?
- 阅读更多 关于 How to customize JSF conversion message 'must be a number consisting of one or more digits'?
问题 I have an input text that is mapped to a Long property. private Long length; <h:inputText value="#{bean.length}" /> When I enter non-digits in that input text, I get the following conversion error: myForm:myField: 'someText' must be a number consisting of one or more digits. I was wondering how to customize this message to: length must be a number greater than zero. 回答1: Either use the input component's converterMessage attribute: <h:inputText converterMessage="length must be a number greater