6 Replies Latest reply: Feb 27, 2014 6:21 AM by Raguraman RSS

How to get data control instance in Managed Bean when mutiple data controls exist

Scofield Wang Newbie
Currently Being Moderated

Th below is my way. it works if there is only one data control. is there any api which can be used to get data control instance by name?

 

        DCDataControl dc = BindingContext.getCurrent().getDefaultDataControl();
        if(dc != null){
            AppModuleImpl am = (AppModuleImpl)dc.getApplicationModule();
           ...
         }

 

 

I don't want to use this orginial way.

 

      String amDef = "model.AppModule";
      String config = "AppModuleLocal";
      ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
      ViewObject vo = am.findViewObject("ObjectView1");

Legend

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