0 Replies Latest reply: Aug 23, 2011 10:33 PM by Chris Muir-Oracle RSS

    Programatically accessing the nodeStamp children of an af:navigationPane?

    Chris Muir-Oracle
      I'm trying to solve a problem on how to programmatically retrieve the nodeStamp children of an RichNavigationPane under ADF 11.1.1.4.0, and I hope readers may be able to assist me please?

      Readers may be familiar with Oracle's Dynamic Tab Shell. At part it displays a set of tabs using the following combination of tags:
      <af:navigationPane id="pt_np1"
        binding="#{viewScope.tabContext.tabsNavigationPane}"
        rendered="#{viewScope.tabContext.selectedTabIndex != -1}"
        value="#{viewScope.tabContext.tabMenuModel}"
        var="tab"
        varStatus="vs">
        <f:facet name="nodeStamp">
          <af:commandNavigationItem id="tabIndex"
            rendered="#{tab.active}"
            actionListener="#{viewScope.tabContext.tabActivatedEvent}"      
            partialSubmit="true"
            text="#{tab.title}"
            immediate="true">
            <f:attribute name="tabIndex" value="#{tab.index}"/>
          </af:commandNavigationItem>
        </f:facet>
      </af:navigationPane>
      As can be seen in the jsf code the binding for the af:navigationPane is synced to the viewScope tabContext bean which gives me access to the RichNavigationPane programatically. What I want to do in Java code is with the RichNavigationPane in hand, access all the RichCommandNavigationItem components that are generated/currently rendered for nodeStamp facet of the RichNavigationPane.

      From my investigation of the RcishNavigationPane APIs there appears to be 2 possible approaches to programmatically grab its children:

      // Approach 1
      // RichNavigationPane navPane = getRichNavigationPane();
      List<UIComponent> navPaneChildren = navPane.getChildren();

      // Approach 2
      // RichNavigationPane navPane = getRichNavigationPane();
      UIComponent nodeStamp = navPane.getNodeStamp();
      List<UIComponent> nodeStampChildren = nodeStamp.getChildren();

      Regardless of the approach, the navPaneChildren or the nodeStampChildren variables are always null which stops me working with the individual af:commandNavigationItem UI components that have been created in the af:navigationPane.

      Does anyone have a suggestion for what I'm doing wrong here please? I can't seem to find the right mechanism for retrieving the children of the RichNavigationPane.

      Your help and assistance appreciated.

      Regards,

      CM.