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!

add a child node to a treetable node (JDev 12.2.1)

Ali HonarmandMay 30 2017 — edited May 30 2017

Hi,

I use treetable on a single table with relation to itself. I get the current node of the component and add a new row but the node is added to root, not to the selected node. can any one help, please?

RowKeySet selectedNodes = richTable.getSelectedRowKeys();

Iterator selectedNodesIter = selectedNodes.iterator();

DCIteratorBinding iteratorBinding = (DCIteratorBinding) getBindingContainer().get(iteratorName);

RowSetIterator iteratorRSI = iteratorBinding.getRowSetIterator();

if (selectedNodesIter.hasNext()) {

    Key currentNodeKey = (Key) ((List) (selectedNodesIter.next())).get(0);

   

   

    treeTableRSI.setCurrentRow(treeTableRSI.getRow(currentNodeKey));

    treeTableRSI.insertRow(treeTableRSI.createRow());

}

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2017
Added on May 30 2017
1 comment
164 views