Detailed Navigation expand node

Hi everyone,
I've been trying to open by default the first node in my Detailed Navigation. I have come very close using the following code which I placed in an iView:
response.write("<SCRIPT>");
response.write("var all = window.DetailedNavigationTree.getNodes();n" +
               "dynamicLoad(all[0]);");
response.write("</SCRIPT>");
This causes the node to be open when you first click in the TLN.
I can close the node by clicking either on the text or on the down arrow next to the node. Now, if I click on the arrow again, the node opens fine, BUT when I click on the text again the node does not reload.
Anyone have any ideas why or how to work around this problem?
I've been looking at detailedNavTree.js, dynamicTree.js and dynamicLoad.js .
Any help would be appreciated a lot!
Thank you,
Regards,
Ale

Everyone,
I have found the solution. The issue was that when we clicked on the text in the detailed nav, the whole page would refresh. This would cause the menu to expand but then the iView with the dynamicLoad() was called again and automatically collapsed the menu again!
So i added a boolean in the class which makes the dynamicLoad() execute only the first time the iView is loaded.
     private boolean mDone = false;
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
         if(!mDone) {
               response.write("<SCRIPT>");
               response.write("var all = window.DetailedNavigationTree.getNodes();n" +
                    "dynamicLoad(all[0]);");
               response.write("</SCRIPT>");
               mDone = true;
Hope this helps!
Ale

Similar Messages

  • Expand folders in Detail Navigation by default

    Has anyone figured out a way to have the folders in details navigation expanded by default the first time the user clicks on the tab? 
    I tried this:
    Expand all folders in the detailed navigation by default on click of Role
    But it didn't work for me.  I have seen other claims that it can be set desktop wide, but no solution.
    Any help would be much appreciated.
    Clark

    Prathamesh,
    First of all thanks so much for your suggestion.  It would have worked perfectly if I was using the lightweight version of the detail navigation.  But is did lead me to download the code for the detail navigation tree par file and I found some interesting things. 
    First of all this should work by changing a parameter on the iview according to the code I found.  See the code below (particularly the set state line). 
        private void openFolder(IPortalComponentRequest request, HashMap dropJScriptsMap, ITree tree, INavigationNode node, ITreeNode treeNode)
            if(treeNode == null)
                return;
            IPortalComponentContext componentContext = request.getComponentContext();
            IPortalComponentProfile profile = componentContext.getProfile();
            Boolean leafNode = null;
            try
                leafNode = (Boolean)node.getAttributeValue("com.sap.portal.navigation.IsLeaf");
                if(leafNode == null)
                    leafNode = Boolean.FALSE;
            catch(NoSuchAttributeException ex)
                leafNode = Boolean.FALSE;
            String openFolder = profile.getProperty("com.sap.portal.navigation.detailedtree.openfolder");
            if(openFolder.equals("true") && leafNode != Boolean.TRUE)
                treeNode.setState("o");
                addNavNodeChildrenToTree(request, tree, node, dropJScriptsMap, true);
    But it only looks to work if the folder is at the top level.  Otherwise it rights children as closed.  See the line for setState in method addNavigationNodesToTree.
                if(newNode.getVisualizationType() == 2)
                    if(parentNode != null)
                        treeNode = tree.addNode(nodeName, title, "F", parentNode);
                    else
                        treeNode = tree.addRoot(nodeName, title, "F");
                    treeNode.setState("c");
                    treeNode.setFolderOpenImage(mm_folderImageUrl);
                    treeNode.setFolderCloseImage(mm_folderImageUrl);
                } else
    So I really have 2 options.  I can redeploy new code with the line just above changed (I didn't plan on modifying the SAP delivered), or I can move my nodes up to a higher level and change the parameters on the iview.
    I hope others might find this useful and perhaps SAP will adopt another iview parameter in the future to completely allow for this as it seems pretty trivial.
    Thanks again.
    ACD

  • Expanding WPC detailed navigation nodes

    I'd very much like for our Web page composer navigation nodes in the detailed navigation to expand on load. Preferably I would like to have the option to expand all nodes.
    For me it doesn't even seem to work to use the new functionality of the detailed navigation iview where you can set the first node to expand on load. This works if the first node is a work set but not if it's a folder pointing to a WPC navigation structure.
    Any tips?
    Regards
    Henning Strand

    Jagadeesh,
    the detailed navigation (and everything that belongs to the framework page) is under responsibility of the Portal. The Web Page Composer tool is just managing the pages not how they are shown in the Portal environment. Therefore WPC  should not be blamed for lack of this specific functionality.
    What you want can be achieved by means of some custom code in the framework. You could create your own detailed navigation iview which following some logic determines which pages need navigation tree shown and which not. Writing such an iview is not trivial effort you may also try to insert some logic (iview) in the framework page which removes the detail navigation iview from the POM tree but I am not really sure if that will work or not.
    Hope this gives some more light.
    Best,
    --epexpert

  • Detailed Navigation (disable expand./collapse icons opening tree

    Hi,
    I would like to adjust the detailed navigation as this site performs with having no action when clicking the +/- icons.
    Please can someone point me in the right direction.  I have been able to get the detailed navigation.par file out and look at the jsp code, but not sure where this requires a change.
    Will reward points for a helpful answer....
    Kai

    If I am reading your question correctly, you want to create a detailed navigation similar to SDN so that when you click on the expand/collapse icon it doesn't do a server round trip.
    Firstly I believe that the standard one performs a round trip to retrieve the nodes underneath the one that you have expanded.
    With SDN we created our own detailed navigation iview so that the entire navigation structure is loaded immediately. This is also the same if you use the standard light navigation iview I believe, so you could simply use this iview instead.
    I hope this helps
    Darrell

  • How to Display Detailed navigation passing Top level navigation node name

    Hi All,
    I have prepared a DLN par file but unfortunatly my requirement is such that I need to pass one of the toplevel node name as input parameter and that should display the corresponding DLN which is from 3rd level.
    I have checked in sdn for passing a value to the navigation tag lib which will consider it as a selectednode but could find none.
    Can some body suggest me how to acheive this.
    Thanks in Advance.
    Sai Krishna. K

    Hi Kiran,
    Thanks for your Reply..
    Following is my Scenario:
    I use 2 same versions of portals connected via federated portal concept.
    I have my detailed navigation par file in portal2 and was calling it from portal1 from a iview.
    Since I am not physically navigating in portal2(which mean there is no selected node to iterate ), when I call that iview in portal1 it is picking up only 1st node in top level navigation.
    So i need to pass "My reports" (as 1st level) & "India" (as 2nd level) as parameters such that it gets only its DTN at all times from 3rd level.
    Hope you understand my scenario, below is my iteration code logic.
    <div id="myslidemenu" class="jqueryslidemenu">
    <ul>
         <nav:iterateSelectedNavNodesLevel level="<%=START_LEVEL%>">
         <%-- the 'currentDepth' attribute provides the byte value of the current level --%>
        <nav:recurseNavNodeChildren currentDepth="depth">
             <% current = start + depth.intValue() - 1; %>
             <%=writeClosingTags(last - current)%>
             <%
            last = current;
            %>
            <%-- we want to distinguish between folder and leaf nodes so we can use different graphics --%>
              <%-- complete the html syntax for the 'class' attribute pass it as an anchor attribute--%>
              <li><nav:navNodeAnchor navigationMethod="byURL" />
              <%-- checks for additional navigation level and the appropriate html tags to accomodate them --%>
            <nav:ifNextRecursionDepthWillIncrease>
                <ul>
            </nav:ifNextRecursionDepthWillIncrease>
            <nav:ifNextRecursionDepthWillNotChange>
                </li>
            </nav:ifNextRecursionDepthWillNotChange>
        </nav:recurseNavNodeChildren>
        <%=writeClosingTags(last - start)%>
        <% last = start; %>
    </nav:iterateSelectedNavNodesLevel>
    </ul>
    </div>
    As per the passing parameter concept please explain me a bit more clear with step by step procedure.
    <b>Here if not passing parameters, providing static values will also do for my requirement.</b>
    Many Thanks,
    Sai Krishna.
    Edited by: Konchada Sai Krishna on Feb 14, 2009 9:42 PM

  • Expand all folders in the detailed navigation by default on click of Role

    Hi All,
    I have a requirement on expand all the folders in the detailed navigation by defalut when we click a Role in the Fist level navigation.
    Please have a look about our requirement as mentioned below.
    ->Role1(First Level Navigation)
       ->Wokset1(Second Level)
           -> Folder1(Detailed Navigation entry Folder)
                  -> Folder2
                       Page1
                       Page2
                  ->Folder3
                       Page3
                       Page4
                  -> Folder4
                       Page5
                       Page6
    When the user clicks on Role1 then automatically all the folders in the detailed navigation should be expanded by default then user could see all the pages displayed in all folders. currently the functionality is collapsed all the folders by default in the detailed navigation then user has to expand the folders manually.
    Regading this issue, i had seen couple of threads on the same but getting confusion what is the exact solution for the solution.
    in those existing threads some people has mentioned that need to change code in the lightdetailnavigation.par or some other mentioned that it is not worked out even do the required changes in the code of light detail navigation part file. there is no clarity in the existing threads for getting  the exact solution . please let me know what are the properties needs to be changed at folder level or workset level to make sure all the folders should be expanded by default in the detailed navigation??
    Currently we are using portal 7.0 version.
    Any pointers in this regard would be the great help to us??
    Thanks in advance.
    Regards,
    PortalUser
    Edited by: PortalUser100 on Jan 22, 2011 10:15 AM

    Hi,
    To expand all the folder by default, we need to set the property of the detailed navigation tree.
    Open your framework page in the content administration.
    Check on the detailed navigation check box and click on the properties button.
    In the properties, set the value of initial state= OPEN .
    This will expand all the folders by default.
    Hope you understood.
    Regards
    Nishant

  • Expand option in detail navigation menu.

    Hi.
    We have 3rd, 4th level menu in detail nabigation area.
    I means that we configured following.
    Folder - 3rd
       Iview 01 - 4th
       Iview 02 - 4th
    Folder in detail navigation was collapsed in default.
    Is there any way to expand all menu in defail navigation ?
    I try to find a properties in Folder but I can't.
    Any ideas ?
    Regards, Arnold.

    Any ideas ?
    Regards, Arnold.

  • Help with Detail Navigation Node Landing Page

    Hi, When a user clicks on a Detail Navigation Node I have a landing page that says "Welcome to the <Text> Report Area>.  I have a different page for each DTN node so right now I'm maintaining quite a few landing pages.
    I'd like to have 1 dynamic page that says welcome to "Node Text".  Where the Node Text is the text of the detail navigation node they selected. 
    Does anyone know if this is possible to pull off?
    Thanks, Ken Murray

    Below is what your HTML should look like.
    <div id='welcomemessage'></div>
    <scripta>
    document.getElementById('welcomemessage') innerhtml = 'Welcome to'  + EPCM.getSAPTop().document.title;
    </scripta>
    Replace the scripta with script above, since if I put the script out there this forum throws some exception.
    Also add a . and remove the space before innerhtml because even doing so the forum is throwing error. SAP needs to get there act together at least on forum and not blindly filter certain characters.

  • Detailed Navigation gets cleared on clicking any node element

    Hi All,
    I have created a custom framework page by modifying the SAP standard Framework Page. Also I have customized the Top Level Navigation .
    The problem is when I click on any node element in the Detailed Navigation, the entire Detailed Navigation gets cleared (greyed out) and no node elements are displayed. Any idea why this is happening?
    Any kind of help is greatly appreciated.
    Regards,
    Adren

    Is it a query region or a custom search region? What is the code written to null the date fields?
    Is there any flow where the values are retained?
    --Shiv                                                                                                                                                                                                                                                                                                                           

  • Grey border of the detailed navigation node thickens

    Hi Experts,
    When an embedded or URL document library is used in a web page why is the grey border on the right hand side of the detailed navigation node thickened?
    Thanks in advance.

    Hi Vijay,
    you can created an url iview  and give the url property and also set the property to open in new window.
    Assign this a role. when u click the role it automatically open a new  window with the descried url iview.
    hope it helps you.
    Raghu

  • Mouse over of detailed navigation nodes?

    Hello EP Development Gurus,
    I am in need of displaying some text on the mouse over of the detailed navigation nodes. How can I achieve this? Where can i find the java script code relating to it?
    Helpful answers will definitely be rewarded. please help me.
    Thank you all in advance.
    best regds,
    Alagammai.

    Hi Harish,
    Thank you for your immediate reply.
    I think even if I create a full paged iView, the navigation panel will be there.
    I don't want the left side navigation inside the content area.
    In the existing default navigation panel, i need to display some mouse-over text.
    To be exact, I need the par file that contains the javascripting relating to the detailed navigation part. I checked in par files like <b>com.sap.portal.navigation.detailedtree</b> and <b>com.sap.portal.layouts.framework</b>. But no use. I am not able to find the relevant code there.
    If I am not clear, please get back to me.
    best regds,
    Alagammai.
    Message was edited by: Alagammai Arunachalam

  • Detailed Navigation collapsed/expanded

    Hi everyone,
    For SAP EP 7.3 is it possible to configure (without development) that Detail Navigation appears initially collapsed when clicking any workset second level option? And once any option be selected inside the page this Detailed Navigation section be expanded again?
    Thanks in advance,

    Hi,
    There is a property called "Initial State of Navigation Panel" and the options available for this property are Open, Close, Automatic and Always Close. This property is available for Role/Workset/Page?iView. Please work on this property to get the required result.
    Regards,
    Nagireddy.

  • Selecting services in Dynamic Navigation expands leaf folders in DTN

    Hi,
    I have a Detailed Navigation menu composed of 3 main folders displayed as leaf folders. To each leaf folder I have attached services by dynamic navigation.
    When I click on one of the services in dynamic navigation, the DTN menu is being expanded and displays also nodes below the main leaf folder.
    I need to add information that the pages displayed by services are displayed in the portal content area and not in a separate window. DTN is not expanded when the page is opened in a separete window.
    Is it at all possible to avoid expanding DTN when using services in dynamic navigation with pages displayed in the portal content area?
    I'm using NW Portal 7.0 SP15.
    BR
    Beata

    Hi Chris,
    Thanks for your response.
    We do have a different user group for each country, but there is only one role for all the countries.
    Please pardon my ignorance, but if you are talking about controlling permissions through the permission editor in the PCD, my understanding is that these permissions only control which pages/iViews are available for personalization for the end user.
    Even if I give end user permissions to specific country groups, will they not be able to see the content because their user group is assigned to the role in user management? Or should I not assign the groups to the role at all?
    Could you please elaborate more on this?
    Thanks in advance,
    Priya
    P.S. I am a big fan of your blogs. Learnt most of homepage framework from your blogs.
    Edited by: Priya R on Jul 24, 2008 4:40 PM

  • Detail Navigation missing when i link a web page in the WPC Scenario

    Hi to all.
    I had publish WPC site with the External Connector method.
    I have some Web Pages linked in the Navigation Structure, when i link one of this from a internal link (for example in a List link or other) I displayed the page and the detail navigation is visible and the focus on the destination page is light.
    Well, when I try to link a Web Page that not is linked in the Navigation structure (open it in the same page) the Navigation structure is missing.
    Why? How i can leave the NAvigation structure and display the page?
    Many thanks for your help in advance.

    Hi,
    this scenario is not supported by WPC. I think it was written somewhere (in a note or so). The problem is that if a page is not included in the navigation structure there is no navigation node associated. And so link to that page does not contain NavigationTarget therefore it does not trigger a real portal navigation but just displays the page in the iframe in which it has been fired. That means if you are using the standard framework page (i.e. with frames) page is shown in the inner most frame and the rest is untouched (side effect from which is that the TLN is not updated) and if you are using the light framework page after click the page is shown on the whole window as there are no iframes.
    May be you would be able to work around this by selecting such page to be opened in pop up window. Other options exist but they are more complicated as solutions.
    Hope that helps.
    regards,
    --epexpert

  • Can you default a detailed navigation folder to an "open" state?

    We have a workset containing iViews, and the detailed navigation on the left displays the iViews within a folder as we would like.  However, the folder defaults to being closed, thus making the user click twice to arrive at an iView inside.  Is there a way to default that folder to being open?

    Hi Kris,
    Its is not possible to have a folder expanded by default when you have all other parallel folders are closed.
    Either you can expand only the root folder on DLN or expand all the folders. Expanding all the folder option would need DLN .par customization.
    Set the below settings to open launched folder:
    Go to Your current Framework Page -> Desktop inner page -> Open Detailed Navigation iView and set the property ->  Open Folder when Launched as yes.
    Initial State of Navigation Panel option shall expand/close the entire DLN.
    Ram

Maybe you are looking for