Welcome to the IBM Collaboration Solutions Community IQJam
UsernamePassword
Reset Password | Register
   
Home | Tags | Help
dijit.tree in 8.5.2 No Longer Highlighting Selected Link 
I was using the following type of dijit.tree as my menu in an xPages application.  it worked perfectly in 8.5.1 (on both server and client), but in 8.5.2, while the correct links produce the correct xPages, the selected link no longer remains highlighted.  The whole tree appears to refresh and the highlight goes back to the very top of the tree. 
 
Can you please tell me how I can get the selected link to stay highlighted in 8.5.2 (on both server and client)?
 
Here is the code:
 
<div id="leftframe">
   <img src="oscar.gif" border="0" />
        <div class="leftframecontent">

         
  <!--  begin markup tree -->
           <div dojoType="dojo.data.ItemFileReadStore"
                 jsId="navStore" url="nav.json" urlPreventCache="true">
           </div>
 
          <div dojoType="dijit.tree.ForestStoreModel"
                jsId="navModel" store="navStore"
                query="{type:'cat'}" rootId="navRoot"
                rootLabel="OSCAR" childrenAttrs="children">
            </div>
          
           <div dojoType="dijit.Tree" id="mytree"
                model="navModel" openOnClick="true" showRoot="false" jsId="navTree">
                <script type="dojo/method" event="onClick" args="item">
                    
<!--  item id is the xsp page name -->
                    var pageName = navStore.getValue(item, "id");
                   
                    <!--
navigate to xsp page -->
                    window.location.href = pageName + getSessionParm();
                </script>

                 <script type="dojo/method" event="onOpen" args="item">
                    <!--
get current xpage name (this should match a node in the tree) -->
                    var currentPage = getCurrentXPage();
                   
                    <!--
focus the node that matches the current page -->
                    var node = navTree._itemNodesMap[currentPage];
                    if (node) {
                        navTree.focusNode(node);
                    }
                </script>

            </div>
            <!--  end tree -->

 </div>
Domino Development / XPages
Tagged
Lenni Sauve - over 3 years ago |  |  | Viewed 357 times

There is 1 answer

0votes
Looks like you are navigating to a whole different page on selection?  If that's the case, then the component is completely reloading, and it won't keep the selection by default.  You'll have either set a sessionScope variable and programmatically reselect the given node, or preferably, can you accomplish the same thing using partial refreshes or loading the content into an iframe so that the tree (and data, etc) doesn't get reloaded ... I think you'll find it much faster as well...
Jeremy Hodge - over 3 years ago | 
Voting
Vote on the answer to show whether you think the answer is correct or useful to the rest of the community.

Answers with more votes are more visible to the rest of the community

Latest Answers for Domino Development / XPages 

How to call LS agent in xpage
Vijay Kumar - 6 months ago
Multi-values in an xPage view panel column
Judy Kilpinen - 7 months ago
From CSJS refresh a panel dijit.TooltipDialog
daniele grillo - about 1 year ago
How to get value from Repeater Control.
Atul Saxena - about 1 year ago
doing a partial update "beforepageload"
jeroen somhorst - about 1 year ago
How to get value from Repeater Control.
jeroen somhorst - about 1 year ago
How to get value from Repeater Control.
Mervin Thomas - about 1 year ago
Where Would I Delete My Cookie?
Lenni Sauve - over 2 years ago
Query_String value empty with agent URL from xpage
Andy Cunliffe - over 2 years ago
textfield formatting
Ben Poole - over 2 years ago
File Upload/File Download using Managed Beans
Toby Samples - over 2 years ago
File Upload/File Download using Managed Beans
Andy Cunliffe - over 2 years ago

Experts for Domino Development / XPages

There are no experts to display