2 Replies Latest reply on Feb 11, 2013 4:21 PM by spamula

    How to get  a Current Navigation model  Current Selection (node) ID

      we are using default navigation model for page navigation in our application.
      I am trying to get Id of Default Navigation model node, I am able to get the Title using following code which available in globe template.

      Code – pageTemaplate_globe.jspx :
      <af:forEach var="node" varStatus="vs"
      items="#{navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}">
      <af:subform id="pt_sfm1">
      <div class="bea-portal-book-primary-menu-single-item">
      <af:switcher id="pt_sw1"
      facetName="#{(empty node.attributes['Target']) || (node.attributes['Target'] == '_popup') ? 'command' : 'golink'}">
      <f:facet name="command">
      <af:commandLink id="pt_cl1" text="#{node.title}"
      disabled="#{not node.navigable}"
      clientComponent="#{node.attributes['Target'] == '_popup' ? true : false}">
      <!-- pass node to processAction for setting current selection and navigation -->
      <f:attribute name="node" value="#{node}"/>
      <af:setActionListener from="#{node.title}"

      I am using +<af:setActionListener/>+ to set Title to variable and using in that in code.

      Is there a way that i can get ID in the same way as title?

      I see following EL from documentation but there is no ID attributes available.
      EL: #{navigationContext.defaultNavigationModel.currentSelection.attributes['Description']}
      EL: #{navigationContext.defaultNavigationModel.currentSelection.title}

      Please help me…

      Thank you,