Search This Blog

Custom Error Handling ADF Screen using Java Code ( Oracle BPM 11g ) Taskflow


Custom Error Handling ADF Screen using Java Code ( Oracle BPM 11g ) Taskflow



   Most of the time try and catch block used in java code to handle error, but in terms of customer view Exception page has to be show in-order to avoid panic. Use below method and call any were from Catch block.


     import oracle.adf.controller.ControllerContext;

    ControllerContext controllerCtx = null;
    

   public  void setRedirectPageMethod(String custmMessage ,String StackTraceMessage) {
  
    FacesContext fcntx = FacesContext.getCurrentInstance();
    ExternalContext ectx = fcntx.getExternalContext();
    String viewId = "/faces/CustomErrorPage_Form.jspx";
    controllerCtx = ControllerContext.getInstance();
    String activityURL = controllerCtx.getGlobalViewActivityURL(viewId);
    try{
      ectx.redirect(activityURL);
         
    }
    catch(Exception e) {

    }
}




Your comments and suggestion are always welcome :-)

No comments:

Post a Comment