Friday, March 8, 2013

ADF 11G : Catch the exception at runtime and Display it on page

ADF 11G : Catch the exception at runtime and Display it on page


catch(Exception e) {

FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");

FacesContext.getCurrentInstance().addMessage(null, msg);

}
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_WARN, msgHead , msgDetail);

facesContext.addMessage(uiComponent.getClientId(facesContext), msg);