29 December, 2012

Controlling TaskFlow Programatically

One of the generic solution is handling  taskflow programatically, To achieve this  you should get an object of a taskflow at managed bean and then you can call its methods for controlling in taskflow.

You can use the below method for this purpose.
Note you pass to the method taskFlowName used in page definition not the original taskflow name.

   public static DCTaskFlowBinding getTaskFlow(String taskFlowName) {  
     BindingContext bindingCtx = BindingContext.getCurrent();  
     DCBindingContainer dcbCon = (DCBindingContainer)bindingCtx.getCurrentBindingsEntry();  
     DCTaskFlowBinding taskFlow = (DCTaskFlowBinding)dcbCon.findExecutableBinding(taskFlowName);  
     return taskFlow;  


15 December, 2012

ADF : Open Page in insert Mode

While developing data entry pages, the major request of the user is opening the page in Insert Mode ( Ready for entry).

To do this requirement we do the below steps
1- Execute executeEmptyRowSet() method for master ViewObject used in page.
2- Insert new empty row in master ViewObject
3- Make inserted row as current row in master ViewObject

I developed the below method in ApplicationModuleImpl for doing the previous steps.
You pass view object named used in application module.

   public void initInsertMode(String viewObjectName) {  
     ViewObject viewObject = this.findViewObject(viewObjectName);  
     Row row = viewObject.createRow();  

Import the following Classes

 import oracle.jbo.Row;  
 import oracle.jbo.ViewObject;  

I published before a post about Insert Rows in ADF View Object Programatically , it may be useful, you can read it from here   


ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...