| Author |
maintaining the current state in weblogic portal
|
Prashant Kirtiwar
Greenhorn
Joined: Jul 08, 2005
Posts: 6
|
|
hello guys.... I do want ur help as quick as possible...so be there and hope u respond quickly with the appropriate code... thnx in advance.... I want to maintain the current state in tree-node structure using net-ui library in weblogic portal 8.1 here is the scenario.... /* Code is here pls go through it */ public Forward treeState_Revision() { String nodeSel = null; String nodeExpanded = null; HttpSession session = getRequest().getSession(); TreeNode rootNode = (TreeNode) session.getAttribute("_rootNodeRevision"); /* * Handles expansion / collapse of a tree node. * * Get the String name of the content node or the expandable/collapsable node * selected by the user. */ if(((String)session.getAttribute("NodeSlect"))==null) { nodeSel = getRequest().getParameter(TreeNode.SELECTED_NODE); session.setAttribute("NodeSlect",nodeSel); } else { nodeSel=(String)session.getAttribute("NodeSlect"); } if(((String)session.getAttribute("NodeExpanded"))==null) { nodeExpanded = getRequest().getParameter(TreeNode.EXPAND_NODE); session.setAttribute("NodeExpanded",nodeExpanded); } else { nodeExpanded=(String)session.getAttribute("NodeExpanded"); } //nodeSel = getRequest().getParameter(TreeNode.SELECTED_NODE); //session.setAttribute("NodeSlect",nodeSel); // nodeSel= (String) session.getAttribute("NodeSlect"); //nodeExpanded = getRequest().getParameter(TreeNode.EXPAND_NODE); //session.setAttribute("NodeExpanded",nodeExpanded); // nodeExpanded = (String) session.getAttribute("NodeExpand"); /* * If the user selected an expandable/collapsable node... */ if (nodeExpanded != null) { /* * ...then get the TreeNode object based on the node's String name... */ TreeNode node = rootNode.findNode(nodeExpanded); if (node != null) { /* * ...and reverse the expand/collapse state of the node. * (I.e. if the node was previously collapsed, then expand it; * if it was previously expanded, then collapse it.) */ node.setExpanded(!node.isExpanded()); } /* * When a node is selected for expansion/collapse, display changes only in the * navigation frame. */ return new Forward("tree_Revision"); } return new Forward(nodeSel); } /** with the above code and XML parsing I have created the parent node ,their child nodes..like *Revision *2000 *module 1 so how should i maintain the state of selected node... Regards Prashant.....
|
 |
 |
|
|
subject: maintaining the current state in weblogic portal
|
|
|