1 Reply Latest reply: May 19, 2011 4:07 AM by Jobinesh-Oracle RSS

    How can I get current ViewObject Iterator From DCBindingContainer

    689761
      Hi,

      How can I get current ViewObject Iterator from DCBindingContainer according to the page which is being used VO?

      In my scenario, I need to set AttributeHints to ViewObject Dynamically according to user inputs and validations.So I have overridden validateModelUpdates method in controller, from there itselfI suppose to put attributeHints.

      @Override
      public void validateModelUpdates(LifecycleContext lcContext) {
      System.out.println("got in validateModelUpdates..");
      //lcContext.getCurrentInstance().getBindingContext().dataControlFrame().
      Map sessionMap =
      FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
      BindingContext context =
      (BindingContext)sessionMap.get(BindingContext.CONTEXT_ID);
      String currentFrameName = context.getCurrentDataControlFrame();
      System.out.println("currentFrameName ->" + currentFrameName);
      DataControlFrame dcFrame =
      context.findDataControlFrame(currentFrameName);
      System.out.println("Name->" +
      dcFrame.findDataControl(currentFrameName));
      // System.out.println("App Name->" + dcFrame.getBindingContainer(context));
      //getApplicationModuleForDataControl(dcFrame.getName())

      for (DCBindingContainer dc: dcFrame.getBindingContainers())
      {

      System.out.println("Container-> "+ dc);
      System.out.println("ctrl->"+dc.getAttributeBindings().toArray()[0]);
      System.out.println("Name app->"+getApplicationModuleForDataControl(dc.getName()));
      for (Object o:AdfFacesContext.getCurrentInstance().getDataUpdateManager().getModelList())
      System.out.println("Model->"+o);

      }
      super.validateModelUpdates(lcContext);
      }