How to handle exception message in richfaces,please suggest the same.
<h:inputtext value=#”{userbean.userid}” />
<h:inputsecret value=#”{userbean.password}” />
<h:commandlink action=”#{userbean.login” value=”login” />
Public class UserBean
{
String userid;
String password;
Public String login()
{
String errorcode=DB.login();
If(errorcode.equals(“NOTFoundUserid”))
{
//I want to display the error message into gui like
Userid not found;
}
Else
If(errorcode.equals(“SUCCESS”))
{
//redirect to success page…….
)
}
}
You could use standard JSF messages for that. Check JavaDoc for FacesContext.addMessage(..)