Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JDev 11g ADF Tree question on programmatically expand and select node

I have two questions:

1. I'm trying to automatically expand the first level tree nodes upon display of the tree. I tried to initialize a RowKeySetImpl object, and added ArrayList of first level nodes, and used setDisclosedRowKeys method. The tree nodes are not rendered properly. If I take the following code out, then the tree content is rendered properly. Here is my code. I have three nodes that I want to expand.

ArrayList node1 = new ArrayList();
node1.add(new Integer(0));

ArrayList node2 = new ArrayList();
node2.add(new Integer(1));

ArrayList node3 = new ArrayList();
node3.add(new Integer(2));

RowKeySetImpl expand = new RowKeySetImpl();
expand.add(node1);
expand.add(node2);
expand.add(node3);
this.mainTree.setDisclosedRowKeys(expand);

2. I have a Panel Splitter, on the first facet, it contains a tree, on the second facet it will be either 'task list', or 'edit task'. When user selects a task in the 'task list', I would like to display 'edit task', while highlight the selected 'task' node on the tree.

In respond to the ActionListener of the command link (each command link corresponds to task):
1. How do I determine the properly node in the tree?
2. I constructed a RowKeySetImpl object and called setSelectedRowKeys. But I get messagebox saying "To display the webpage again, Internet Explorer needs to resend the information you've previously submitted." If I clicked Retry button, the message box just gets displayed again. If I cancel, the node I hardcoded does get selected properly.

Please help me!

Thanks,

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 27 2008
Added on Oct 30 2008
0 comments
314 views