5 Replies Latest reply: Dec 28, 2012 1:01 PM by Shay Shmeltzer-Oracle RSS

    JDeveloper 10g: getting ApplicationModule in servlet

    982061
      Hi guys!

      Please tell me how to get ApplicationModule in servlet, I am using JDeveloper 10g.
      public static ApplicationModule getAM(String name) {
              if (name == null || name.length() == 0) {
                  return null;
              }
      
              FacesContext ctx = FacesContext.getCurrentInstance();
              Application app = ctx.getApplication();
              ValueBinding bind = app.createValueBinding("#{data." + name + ".dataProvider}");
      
              return (ApplicationModule)bind.getValue(ctx);
      }
      I could not get a instance FacesContext...