This discussion is archived
5 Replies Latest reply: Dec 28, 2012 11:01 AM by Shay Shmeltzer RSS

JDeveloper 10g: getting ApplicationModule in servlet

982061 Newbie
Currently Being Moderated
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...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points