4 Replies Latest reply on Apr 1, 2014 3:01 PM by Saif Khan

    Navigation Model Child Node

    Saif Khan

      Hi,

       

      I have created a sample Webcenter portal application by following WebCenter 11g PS3 Tutorial: Introduction | Yannick Ongena's WebCenter And Enterprise 2.0 Blog.

       

      As shown in this link, https://lh6.googleusercontent.com/-2Wo_k93ZX7I/TfZ3XC0n0uI/AAAAAAAABM0/NM7vJbsOQus/p2_008.png

       

      I am not able to get the submenu on mouse over of the "My Courses" link. I have logged and also tried inheriting the parent security. But no luck.

       

      Is there something that I am missing out.

       

      Tested in both JDeveloper: 11.1.1.5 & 11.1.1.6

       

      Thanks,

      Saif Khan

        • 1. Re: Navigation Model Child Node
          Daniel Merchán

          Hi.

           

          If you can paste your template-code / navigation-model / page hierarchy.

           

          Regards.

          • 2. Re: Navigation Model Child Node
            Saif Khan

            Page Hierarchy

             

            <?xml version="1.0" encoding="windows-1252" ?>
            <pagesDef xmlns="http://xmlns.oracle.com/webcenter/page"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://xmlns.oracle.com/webcenter/page/pagesDef.xsd">
              <pageDef contentMRef="/oracle/webcenter/portalapp/pages/home.jspx"
                       hidden="false" shared="false" hasSubPages="false" id="home"/>
              <pageDef contentMRef="/oracle/webcenter/portalapp/pages/aboutUs.jspx"
                       hidden="false" shared="false" hasSubPages="false" id="aboutUs"/>
              <pageDef contentMRef="/oracle/webcenter/portalapp/pages/myCourses.jspx"
                       hidden="false" shared="false" hasSubPages="false" id="myCourses"
                       overridePolicy="true"/>
            </pagesDef>
            

             

             

            Template (copied only navigation bar code)

             

            <cust:panelCustomizable id="pt_pc4"
                                            inlineStyle="background-image:url(#{facesContext.externalContext.requestContextPath}/images/globe_tab-bkg.png);background-position:center top;background-repeat:repeat-x;padding-top:2px;"
                                            rendered="#{!composerContext.inEditMode and attrs.showNavigation and !attrs.isEditingTemplate}">
                      <af:panelGroupLayout id="pt_pgl3" layout="horizontal"
                                           inlineStyle="height:20px;">
                        <af:spacer id="pt_sp3" width="10"/>
                        <!-- iterate over navigation items -->
                        <af:forEach var="node" varStatus="vs"
                                    items="#{navigationContext.defaultNavigationModel.listModel['startNode=/, includeStartNode=false']}">
                          <af:subform id="pt_sfm1">
                            <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}"
                                                inlineStyle="font-size:small;#{node.selected ? 'font-weight:bold;' : ''}"
                                                action="pprnav"
                                                disabled="#{not node.navigable}"
                                                actionListener="#{navigationContext.processAction}"
                                                clientComponent="#{node.attributes['Target'] == '_popup' ? true : false}">
                                  <!-- pass node to processAction for setting current selection and navigation  -->
                                  <f:attribute name="node" value="#{node}"/>
                                  <af:showPopupBehavior popupId="menuPopup"
                                                        align="afterStart"
                                                        triggerType="mouseOver"/>
                                  <c:if test="${node.attributes['Target'] == '_popup'}">
                                    <af:clientAttribute name="modelPath"
                                                        value="#{node.navigationModel.metadataId}"/>
                                    <af:clientAttribute name="selectedPrettyUrl"
                                                        value="#{node.prettyUrl}"/>
                                    <af:clientAttribute name="selectedTitle"
                                                        value="#{node.title}"/>
                                    <af:showPopupBehavior popupId="::rendererPopup"
                                                          triggerType="action"/>
                                  </c:if>
                                </af:commandLink>
                              </f:facet>
                              <f:facet name="golink">
                                <af:goLink id="pt_gl1" text="#{node.title}"
                                           destination="#{node.goLinkPrettyUrl}"
                                           targetFrame="#{node.attributes['Target']}"
                                           inlineStyle="font-size:small;#{node.selected ? 'font-weight:bold;' : ''}">
                                  <af:showPopupBehavior popupId="menuPopup"
                                                        align="afterStart"
                                                        triggerType="mouseOver"/>
                                </af:goLink>
                              </f:facet>
                            </af:switcher>
                            <af:spacer id="pt_sp9" width="20" rendered="#{! vs.last}"/>
                            <af:popup id="menuPopup" contentDelivery="immediate"
                                      animate="false" rendered="#{! empty node.children}">
                              <af:panelGroupLayout id="pt_pgl7" layout="vertical">
                                <af:forEach var="node2" varStatus="vs2"
                                            items="#{node.children}">
                                  <af:spacer id="pt_sp10" height="5px"/>
                                  <af:switcher id="pt_sw2"
                                               facetName="#{(empty node2.attributes['Target']) || (node2.attributes['Target'] == '_popup') ? 'command' : 'golink'}">
                                    <f:facet name="command">
                                      <af:commandLink id="pt_cl2" text="#{node2.title}"
                                                      inlineStyle="#{node2.selected ? 'font-weight:bold;' : ''}"
                                                      action="pprnav"
                                                      disabled="#{not node2.navigable}"
                                                      actionListener="#{navigationContext.processAction}"
                                                      clientComponent="#{node2.attributes['Target'] == '_popup' ? true : false}">
                                        <!-- pass node to processAction for setting current selection and navigation  -->
                                        <f:attribute name="node" value="#{node2}"/>
                                        <c:if test="${node2.attributes['Target'] == '_popup'}">
                                          <af:clientAttribute name="modelPath"
                                                              value="#{node2.navigationModel.metadataId}"/>
                                          <af:clientAttribute name="selectedPrettyUrl"
                                                              value="#{node2.prettyUrl}"/>
                                          <af:clientAttribute name="selectedTitle"
                                                              value="#{node2.title}"/>
                                          <af:showPopupBehavior popupId="::rendererPopup"
                                                                triggerType="action"/>
                                        </c:if>
                                      </af:commandLink>
                                    </f:facet>
                                    <f:facet name="golink">
                                      <af:goLink id="pt_gl2" text="#{node2.title}"
                                                 destination="#{node2.goLinkPrettyUrl}"
                                                 targetFrame="#{node2.attributes['Target']}"
                                                 inlineStyle="font-size:small;#{node2.selected ? 'font-weight:bold;' : ''}"/>
                                    </f:facet>
                                  </af:switcher>
                                </af:forEach>
                              </af:panelGroupLayout>
                            </af:popup>
                          </af:subform>
                        </af:forEach>
                      </af:panelGroupLayout>
                    </cust:panelCustomizable>
            

             

             

             

            Navigation-Model

             

            <?xml version="1.0" encoding="US-ASCII" ?>
            <navigationDefinition description="Default Navigation" 
                           id="default-navigation-model"
                           name="Default Navigation"
                           xmlns="http://xmlns.oracle.com/adf/rcs/catalog" visible="#{true}">
              <contents>
                <customFolder id="pages" factoryClass="oracle.webcenter.page.view.rc.PageServiceContextFactory"
                              visible="true" insertFolderContents="true">
                  <attributes>
                    <attribute value="Page Hierarchy" attributeId="Title" isKey="false"/>
                    <attribute value="/adf/webcenter/pagegroup_qualifier.png" attributeId="IconURI"/>
                  </attributes>
                  <parameters>
                    <parameter id="path">/oracle/webcenter/portalapp/pagehierarchy/pages.xml</parameter>
                  </parameters>
                </customFolder>
              </contents>
              <schema resourceBundle="oracle.adf.rc.attribute.nls.AttributeBundle">
                <descriptor multivalue="false" shortLabelKey="TITLE.SHORT_PROMPT_KEY"
                            labelKey="TITLE.PROMPT_KEY" attributeId="Title"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="ACCESS_KEY.SHORT_PROMPT_KEY"
                            labelKey="ACCESS_KEY.PROMPT_KEY" attributeId="AccessKey"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="DESCRIPTION.SHORT_PROMPT_KEY"
                            labelKey="DESCRIPTION.PROMPT_KEY" attributeId="Description"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="ICON_URI.SHORT_PROMPT_KEY"
                            labelKey="ICON_URI.PROMPT_KEY" attributeId="IconURI"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="true" shortLabelKey="SUBJECT.SHORT_PROMPT_KEY"
                            labelKey="SUBJECT.PROMPT_KEY" attributeId="Subject"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false"
                            shortLabelKey="REDIRECT_FLAG.SHORT_PROMPT_KEY"
                            labelKey="REDIRECT_FLAG.PROMPT_KEY" attributeId="Redirect"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="TARGET_FRAME.SHORT_PROMPT_KEY"
                            labelKey="TARGET_FRAME.PROMPT_KEY" attributeId="Target"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="TOOL_TIP.SHORT_PROMPT_KEY"
                            labelKey="TOOL_TIP.PROMPT_KEY" attributeId="ToolTip"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="MODIFIED.SHORT_PROMPT_KEY"
                            labelKey="MODIFIED.PROMPT_KEY" attributeId="Modified"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false"
                            shortLabelKey="CHANGE_FREQUENCY.SHORT_PROMPT_KEY"
                            labelKey="CHANGE_FREQUENCY.PROMPT_KEY"
                            attributeId="ChangeFrequency" searchable="true"
                            endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="SIGNIFICANCE.SHORT_PROMPT_KEY"
                            labelKey="SIGNIFICANCE.PROMPT_KEY" attributeId="Significance"
                            searchable="true" endUserVisible="true"/>
                <descriptor multivalue="false" shortLabelKey="EXTERNAL_ID"
                            labelKey="EXTERNAL_ID" attributeId="ExternalId"
                            searchable="true" endUserVisible="true"
                            resourceBundle="oracle.webcenter.navigationeditor.view.resource.NavigationEditorBundle"/>
              </schema>
            </navigationDefinition>
            
            • 3. Re: Navigation Model Child Node
              Daniel Merchán

              Hi.

               

              You have wrong the Page Hierarchy. You have all pages at the same level of the tree.

              You can nest the pages inside of the Home node. Do it through the UI with drag & drop.

               

              When Home page has child nodes it has to have hasSubPages attribute to true.

               

              Regards.

              • 4. Re: Navigation Model Child Node
                Saif Khan

                Spot on !!

                 

                Thanks Daniel. That helped.