0 Replies Latest reply on Aug 24, 2011 3:33 AM by Chris Muir-Oracle

    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, 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"
        rendered="#{viewScope.tabContext.selectedTabIndex != -1}"
        <f:facet name="nodeStamp">
          <af:commandNavigationItem id="tabIndex"
            <f:attribute name="tabIndex" value="#{tab.index}"/>
      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.