1 Reply Latest reply on Jul 31, 2012 12:24 AM by Joe Huang-Oracle

    Add error message programmatically


      We are trying to add a new error message from Java code, but we haven't found how it should be done.

      In normal ADF app, the code would be like this:

      FacesContext fc = FacesContext.getCurrentInstance();
      ResourceBundle bundle =
      fc.getApplication().getResourceBundle(fc, "GAGBundle");

      new FacesMessage(FacesMessage.SEVERITY_WARN,

      and then, you get a popup showing the error message. Another way could be using a popup component, and call it from java code:

      popConfirmarPin.show(new RichPopup.PopupHints());

      but, in ADF Mobile, components have not binding property and this is not possible.

      How should the same functionality works in ADF Mobile?

      Thanks in advance,

      Carles Biosca
        • 1. Re: Add error message programmatically
          Joe Huang-Oracle
          Hi, Carles, the Java method you would be invoking is something like this:

          throw new AdfException(getClass().getName(), "No Data Found.",AdfException.INFO);
          - this is to display an informational icon in the popup message

          throw new AdfException(getClass().getName(), pMessage,AdfException.WARNING);
          - this is to display a warning icon in the popup message

          The default is to display error message. You should be able to see invocation details in the AdfException java doc as well.

          This is courtesy of another beta participant, by the way.


          Joe Huang