4344454647484950515253
for (int i = 0; i < validators.length; i++) { Validator validator = validators[i]; try { validator.validate(context, input, convertedValue); } catch (ValidatorException e) { input.setValid(false); FacesMessage facesMessage = e.getFacesMessage();
154155156157158159160161162163164
for (int i = 0; i < validators.length; i++) { Validator validator = validators[i]; try { validator.validate(context, input, convertedValue); } catch (ValidatorException e) { input.setValid(false);
299300301302303304305306307308309
while (validators.hasNext()) { Validator validator = validators.next(); try { validator.validate(context, this, newValue); } catch (ValidatorException ve) { // If the validator throws an exception, we're // invalid, and we need to add a message
339340341342343344345346347348349
301302303304305306307308309310311
307308309310311312313314315316317
Assert.assertEquals("input validator", 1, input.getValidators().length); Validator v = input.getValidators()[0]; v.validate(facesContext, input, "4333"); } @Test public void testValidateDoubleRangeHandler() throws Exception {
324325326327328329330331332333334
Assert.assertEquals("input validator", 1, input.getValidators().length); Validator v = input.getValidators()[0]; v.validate(facesContext, input, new Double(1.8)); } @Test public void testValidateLengthHandler() throws Exception {
341342343344345346347348349350351
Assert.assertEquals("input validator", 1, input.getValidators().length); Validator v = input.getValidators()[0]; v.validate(facesContext, input, "beans"); } @Test public void testValidateLongRangeHandler() throws Exception {
358359360361362363364365366367368
Assert.assertEquals("input validator", 1, input.getValidators().length); Validator v = input.getValidators()[0]; v.validate(facesContext, input, new Long(2000)); } @Test public void testValueChangeListenerHandler() throws Exception {
340341342343344345346347348349350