jsf 2 - Richfaces 4: How to set severity class of messages triggered with client side validation -


i use client-side validation jsr-303 (bean validation) constraints in richfaces 4 showcase

http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=clientvalidation&sample=jsr303&skin=bluesky

if add validation constraint in validation bean like

@pattern(regexp = "^[\\w\\-]([\\.\\w])+[\\w]+@([\\w\\-]+\\.)+[a-za-z]{2,4}$", message = "bad email") private string email;   

an error message triggered.

how can trigger infos etc client side validation in case of server side validation bean method like

public void validateemail(facescontext context, uicomponent tovalidate, object value) {    ...    ((uiinput) tovalidate).setvalid(true);    facesmessage message = new facesmessage("looks good!");    message.setseverity(message.severity_info);    context.addmessage(tovalidate.getclientid(context), message);    ... }    

thanks!

there no way set severity of richfaces csv message. you'll have file feature request via jira requesting such feature:

https://issues.jboss.org/browse/rf


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -