[Index]
Cookies
There is a specialized PropertyIO to handle Cookies. See example at HttpCookiesPropertyIO.
Validators in JSF
New - Since 2.0 - They are generated in JHPropertyTypesExtensions for most PropertyTypes, Link.
@FacesValidator("com.mkyong.EmailValidator")
public class EmailValidator implements Validator{
public EmailValidator(){
super();
}
@Override
public void validate(FacesContext context, UIComponent component,Object value) throws ValidatorException {
try {
new EmailPropertyType().validate(component.getId(),value);
} catch (PropertyException e) {
FacesMessage msg = new FacesMessage("E-mail validation failed.", "Invalid E-mail format ,"+e.getMessage());
msg.setSeverity(FacesMessage.SEVERITY_ERROR);
throw new ValidatorException(msg);
}
}
}
XMLAdapters
New - Since 2.0 - They are generated for most PropertyTypes.
XML Adapters in JHPropertyTypes
XML Adapters in JHPropertyTypesExtensions