hi all,
i've a situation where i'm unable to expand the third-level node in navigation panel of my custom ajax framework page in 7.3 portal.
here is how my navigation.js coded:
- the initial tree function calls:
EPCM.getSAPTop().LSAPI.AFPPlugin.model.getNavigationSubTree(null, drawTopMenu, sapTreeEle);
- drawTopMenu function for drawing the top menu
- the sub function of drawTopMenu calls:
LSAPI.AFPPlugin.controller.registerOnNavigate(drillDownSecMenu);
LSAPI.AFPPlugin.service.navigate(node);
- drillDownSecMenu calls:
var bc = LSAPI.AFPPlugin.model.getCurrentSelectedPath();
var secnodes = bc[0].getChildren(drawSecMenu);
- drawSecMenu draws the second menu and on click it calls clickSecMenu:
- clickSecMenu calls:
LSAPI.AFPPlugin.controller.registerOnNavigate(drillDownLeftMenu);
LSAPI.AFPPlugin.service.navigate(node);
- drillDownLeftMenu function calls:
var bc = LSAPI.AFPPlugin.model.getCurrentSelectedPath();
var secnodes = bc[1].getChildren(drawLeftNavMenu);
- drawLeftNavMenu draws the left menu and calls:
bc = LSAPI.AFPPlugin.model.getCurrentSelectedPath();
secNavNode = bc[1];
secNavNode is used to show title as clickable link
on click it calls: selectLeftNavMenu
- selectLeftNavMenu function does calls doNaviagte
var node = leftNavNodes[index];
EPCM.doNavigate(node.getName());
it works till here. and my code continues like below:
- in selectLeftMenu i'm calling:
var bcT = LSAPI.AFPPlugin.model.getCurrentSelectedPath();
var secnodesT = bcT[2].getChildren(drillDownThirdMenu);
- the drillDownThirdMenu calls:
var bcDTM = LSAPI.AFPPlugin.model.getCurrentSelectedPath();
var secnodesDTM = bcDTM[2].getChildren(expandThridMenu);
- in expandThirdMenu has:
var bcTM = LSAPI.AFPPlugin.model.getCurrentSelectedPath();
if (nodes) {
var thirdnodes = nodes;
for ( var i = 0; i < thirdnodes.length; i++) {
console.log("thirdnodes:"+thirdnodes[i].getTitle());
}
}
now the issue here is the fourth-level nodes only displays when the thirdlevel node is clicked twice. otherwise on the first click it always shows me the previously selected node's children, or the nodes are empty.
i hope there has to be a way to handle this, has any one faced this issue? if yes how did u fixed it? do we've a code to refer to expand the 3rd level to see 4th level nodes or sitemap? or what corrections to be made to my code?