Thursday, December 20, 2012

ADF : Issue with Popup and setPropertyListener

ADF : Issue with Popup and setPropertyListener

I am trying to launch popup on button click and on same event I want to set some property on same event. I was facing issue on that "popup is getting launched but property is not setting to target variable". 

After trying a lot of combination finally I solved issue.

If you are trying to use same then remember following point:
  • Always provide value of triggerType attribute, Value for this attribute must be triggerType="click" only
  •  When using the setPropertyListener define the type="action"
 Find the code snapshot  
                       

         


Using above code both action launching popup and setPropertyListener can be invoked.

Note: Reason of this problem is when me didn't provide triggerType in . It take default as action. So action event triggered and get skipped. Always provide type="action" for Listener> and triggerType="click" for showPopupListener>


Enjoy Coding !!!!!!!!!!!!!!!!!!!!!!!!!!!!

Sunday, December 16, 2012

Parent Action Activity in ADF Bounded Task Flow



Effective use of Parent Action Activity
Here in this post I am explaining the way of Using Parent Action Activity. Using Parent Action client taskflow can call the activity defined in parent task flow. 

This sample application is developed using Hr database, bounded taskflow, control-flow-case, Read only View Object.

Steps to create sample Application
  • Create a Generic Application provide application name as ParentAction. 
  • Create a Project with name ParentAction
  • Select ADF Faces, ADF page flow, Java, ADF Business component as Project Technology
  • Create Business Component from table 
  • Define connection to database using "Hr" schema
  • Create read-only view object for Employee and Department

Define bounded taskflow
Define bounded parent action taskflow
  • Create a taskflow with and ParentActionTasskFlowDefn.xml
  • Added ViewActivity like EmployeeView and DepartmentView 
  •  Define control flow for Employee and Department view
  •  add jsff pages for each ViewActivity.
Define Child taskflow
  • ·         Create a new taslfkow name department-task-flow-definition.xml
  • ·         Add view activity with name of department
  • ·         add parent action
  • ·         define control flow between view and parent action activity
  • ·         add page to view activity
  • ·         Drag drop department view from data control to screen and design page with navigation button
  • ·         Add new button to page, in action of button select the control flow name define in department -task-flow-definition.xml
  • ·         select the parent action update the parent action property to control flow name defined in parent taskflow i.e. ShowEmployee

(Repeat same steps for defining Employee child task flow)
Design the page used in view activity
Drag drop the corresponding taskflow to jsff page used as a view activity in ParentActiontaskFlowDefn.xml
Add lending page
Add the jspx page to application. drag drop ParentActiontaskFlowDefn as region to jspx. Run the application and test it 

Download sample application located at ParentAction.zip