on 05-19-2011 4:35 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.