validation - How to customize the error message on programmatically created LongRangeValidator? -


i created long range validator not able find way customize corresponding message text. using jsf 2.x , apachemyfaces. in advance.

if ((integerfield.getmaximalvalue() != null) && (integerfield.getminimalvalue() != null)) { // serverside validation required     long maximum = integerfield.getmaximalvalue().longvalue();     long minimum = integerfield.getminimalvalue().longvalue();     validator validator = new longrangevalidator(maximum, minimum);     inputinteger.addvalidator(validator); } 

use uiinput#setvalidatormessage().

inputinteger.setvalidatormessage("please enter value in range"); 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -