Sunday, September 15, 2013

Dynamic Task Flow Template Actions in ADF 12c/11g

This will be update for my previous post - ADF Task Flow Template Improvements in 12c, describing how to use dynamic actions in ADF task flow template. Similar dynamic actions can be applied in ADF 11g, this is not limited only to 12c. Dynamic actions allow to build completely reusable ADF task flow template and use it for common use cases, without implementing same actions again and again.

Updated sample application -, is improved with new parameters defined for ADF task flow template. There are two new parameters added - dataControlName and iteratorName, these parameters allow to pass current Data Control Name and Iterator Name for the task flow dynamically:

Create, Commit and Rollback actions are linked with Page Definition files, we can change underlying ADF bindings to be retrieved dynamically based on ADF task flow template parameters:

Action binding for CreateInsert is updated to use dynamic Binds and DataControl properties from parameters:

Action binding for Commit is updated to use dynamic DataControl name property:

Action binding for Rollback is updated to use dynamic DataControl name property:

Region must be configured to pass Data Control and Iterator names for ADF task flow template to be able to provide dynamic actions. These names in real use case scenario can be loaded from DB along with the menu structure:

Sample application is configured to open form in Create mode initially, dynamic action works perfectly:

User can press Undo and navigate to Edit mode - change one of the fields:

Save changes to the DB with dynamic action from ADF task flow template:

No comments: