This content has been marked as final. Show 7 replies
The answer to this depends on your jdev version (which you did not mention) and the data model beneath the tree table.
The easiest case would be that you can do a cascading delete on the master and all children are removed automatically by the framework...
+1 on Timo's answer
For the how-to: see http://www.oracle.com/technetwork/developer-tools/adf/learnmore/november2011-otn-harvest-1389769.pdf "How-to access selected node in tree component" on page 17 If you call remove() on the Row then teh row is deleted with the next commit you send. If there is a cascading behavior implemented on the database tables (cascade delete constraint) and also defined on the association in ADF BC then the child nodes are deleted as well. If there is no cascade delete defined, then you can call getChildren on the JUCtrlHierNode reference to get hold of the child data for a tree component so you can access and delete these rows too
current JDeveloper Studion version is 220.127.116.11.0 and Oracle IDE is 18.104.22.168.38.60.81.
I was asking this question, since I was getting current row from treetable properly, then doing remove() and commiting the changes. The changes were not applied in the database. I was trying several examples that I have seen in the internet, no success. Only working through application module and calling stored procedure I was able to delete the record.
I can prepare an example if it can help.
And thanks for such quick replies on my question!
Are you removing the current Row and commiting the DBTransaction in Application Module ? Does this Row has any master or child data ? Do you see any exceptions while commiting transaction ?
there are no child records and no master records ...
How is the data model wired up?
How do you remove the master record?
If you can prepare a sample build on the HR schema and put it on a file hoster (the forum don't allow file uploads). the post the link here...
I need some time to prepare an working example.