This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes maintaining the current state in weblogic portal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Java in General
Bookmark "maintaining the current state in weblogic portal" Watch "maintaining the current state in weblogic portal" New topic
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.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maintaining the current state in weblogic portal