223224225226227228229230231232233
//set the value component1.setSubmittedValue("blue"); // invoke component validation component1.validate(facesContext); // check for a error message checkMessages(component1); }
267268269270271272273274275276277
//set the value component1.setSubmittedValue("blue"); // invoke component validation component1.validate(facesContext); // check for a error message checkMessage("Favorite Color must be one of the following: black, yellow, red.", component1); }