In Jdeveloper 11g you can make a train of actions ( a kind of wizard to help the user ) . In this example I make a train where I create a department on the first page and then some employees on the second page. See the pictures below. A train is a bounded taskflow ( it has a start and finish point ) where you can define that is has it's own transaction etc.
Here I make a new department
We are ready creating a department we can click on the next button or on the employees link in de top
Here we can make one or more employees and if we are finished we push on submit or cancel.
On submit we defined that is has to go to the calling page and commit the transaction. Cancel does the same only it rollbacks the transaction
Ok how we make all this. First a make a new adf taskflow with the property create train
open the new task-flow-definition and change the following properties
taskflow reentry not allowed and transaction requires transaction
The first view from the component palette and change the display property to departments. The second view is on employees and change the display property to employees
specify two taskflow returns.
the first is succes with succes as outcome and commit by end transaction
the second is cancel with cancel as outcome and rollback by end transaction
create two control flow case
one from employees to succes
one from employees to cancel.
The picture below show the result
open the unbounded taskflow drop the train taskflow on the diagram
from dept view (the calling page ) create a control flow case with the name create and create a return control flow case with cancel and one with succes. If you don't mind the outcome you can put in *. By succes you can put in a requery on the department pages
create the department page from the train task flow and put in a department from with train navigation and train button bar.
Now go the pagedef , make a create binding on the department view and the an invoke action where you select the create binding so the department page goes in insert mode
create the employee page from the train task flow with a department form on the top of the page and a employees creation form. We put in a train navigation and a train button bar and a button with submit as text and submit in the action property and a cancel button with action cancel.
We are ready to give it a try.
Here is the workspace zip