3 Replies Latest reply on Aug 9, 2012 4:57 AM by Daniel Merchán

    The SubLinks are not displayed in a Three Level Menu

    Neliel-Oracle-Newbie-Oracle
      Dear All,

      I have a navigation model with sub links under the main link just like the xml element below.
      I wanted to display this with a menu and when I hover, I wanted it to display the list of my sub links.
      <url url="page://oracle/webcenter/portalapp/pages/Main.jspx"
               factoryClass="oracle.webcenter.portalframework.sitestructure.rc.AdfPageResourceFactory"
               visible="#{true}" id="Main">
        <attributes>
           <attribute isKey="false" attributeId="Title" value="Main"/>
        </attributes>
        <contents>
           <url url="page://oracle/webcenter/portalapp/pages/SubMain1.jspx"
                 factoryClass="oracle.webcenter.portalframework.sitestructure.rc.AdfPageResourceFactory"
                 visible="#{true}" id="SubMain1">
             <attributes>
                <attribute isKey="false" attributeId="Title" value="SubMain1"/>
             </attributes>
           </url>
           <url url="page://oracle/webcenter/portalapp/pages/SubMain2.jspx"
                 factoryClass="oracle.webcenter.portalframework.sitestructure.rc.AdfPageResourceFactory"
                 visible="#{true}" id="SubMain2">
             <attributes>
                <attribute isKey="false" attributeId="Title" value="SubMain2"/>
             </attributes>
           </url>
           <url url="page://oracle/webcenter/portalapp/pages/SubMain3.jspx"
                 factoryClass="oracle.webcenter.portalframework.sitestructure.rc.AdfPageResourceFactory"
                 visible="#{true}" id="SubMain3">
             <attributes>
                <attribute isKey="false" attributeId="Title" value="SubMain3"/>
             </attributes>
           </url>
        </contents>
      </url>
      I read the code from the Webcenter Developer Guide 11.1.1.6 and copied the following code exactly from the guide.
      In PDF this is Chapter 14-17 if you would like to take a look.
      <af:panelGroupLayout id="pgl1" layout="vertical">
           <af:spacer id="sp1" height="20px"/>
           <af:menuBar id="mb1">
             <af:iterator id="i1" value="#{navigationContext.currentNavigationModel.listModel['startNode=/,includeStartNode=false']}" var="node">
                <af:switcher id="s1"
                                facetName="#{empty node.children ? 'leafNode' : 'parentNode'}">
                  <f:facet name="parentNode">
                     <af:menu id="m1" text="#{node.title}"
                                inlineStyle="#{node.onSelectedPath ? 'font-weight:bold;' : ''}">
                       <af:iterator id="i2" value="#{node.children}" var="node2">
                          <af:switcher id="s2"
                                          facetName="#{empty node2.children ? 'leafNode' : 'parentNode'}">
                            <f:facet name="parentNode">
                               <af:menu id="m2" text="#{node2.title}"
                                          inlineStyle="#{node2.onSelectedPath ? 'font-weight:bold;' : ''}">
                                 <af:iterator id="i3" value="#{node2.children}"
                                                 var="node3">
                                    <af:commandMenuItem id="cml3"
                                                             text="#{node3.title}"
                                                             actionListener="#{navigationContext.processAction}"
                                                             action="pprnav"
                                                             icon="#{node3.attributes[pageFlowScope.tnBean.iconKey]}"
                                                             disabled="#{not node3.navigable}" inlineStyle="#{node3.onSelectedPath ?'font-weight:bold;' : ''}">
                                      <f:attribute name="node" value="#{node3}"/>
                                    </af:commandMenuItem>
                                 </af:iterator>
                               </af:menu>
                            </f:facet>
                            <f:facet name="leafNode">
                               <af:commandMenuItem id="cml1" text="#{node2.title}"
                                                        actionListener="#{navigationContext.processAction}"
                                                        action="pprnav"
                                                        icon="#{node2.attributes[pageFlowScope.tnBean.iconKey]}"
                                                        disabled="#{not node2.navigable}" inlineStyle="#{node2.onSelectedPath ?'font-weight:bold;' : ''}">
                                 <f:attribute name="node" value="#{node2}"/>
                               </af:commandMenuItem>
                            </f:facet>
                          </af:switcher>
                       </af:iterator>
                     </af:menu>
                  </f:facet>
                  <f:facet name="leafNode">
                     <af:commandMenuItem id="cml2" text="#{node.title}"
                                              actionListener="#{navigationContext.processAction}"
                                              action="pprnav"
                                              icon="#{node.attributes[pageFlowScope.tnBean.iconKey]}"
                                              disabled="#{not node.navigable}"
                                              inlineStyle="#{node.onSelectedPath ? 'font-weight:bold;' : ''}">
                       <f:attribute name="node" value="#{node}"/>
                     </af:commandMenuItem>
                  </f:facet>
                </af:switcher>
             </af:iterator>
           </af:menuBar>
           <af:spacer id="sp3" height="20px"/>
        </af:panelGroupLayout>
      </af:panelGroupLayout>
      My problem is that this is not rendering the sublink? I am able to see the Main Link though
      Anyone know why?

      Webcenter 11.1.1.6