JSF Validation
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bright_Dadson
Posted On:   Friday, November 28, 2008 12:40 PM

Hi Guys,

I am using below code to valide if a value is null and hence post a message back to the form but doesn't seem to work. Do anyone know what i am doing wrong?



public void validateNull(FacesContext context,UIComponentcompo,
Object value) {
String cont = (String) value;
if (cont == null) {
FacesMessage message = new FacesMessage("Require field");
throw new ValidatorException(message);
}
}

About | Sitemap | Contact