show dialog message as error in OAF

Scenario: Display the error message to user when something is done after clicking or something gone wrong with user action

  • Take the exception object
  • Pass the text information that need to show as error message
  • Use the putDialogMessage method to display error message

 public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)

{

super.processFormRequest(pageContext, webBean);

if("cancelReview".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))){

Object confirmation;

confirmation = new OAException("Customer information not reviewed as cancelled",OAException.ERROR);

pageContext.putDialogMessage((OAException)confirmation);

}     

}

*/

No comments:

Post a Comment