Monday, November 12, 2012

Component Palette : Add Component to Favorite

We use many ADF Faces , HTML , JSF Component for User Interface ,So I would suggest adding most important component to favorite


Add to Favorite Final Outcome
image image

Thursday, November 8, 2012

Managed vs Backing Bean

Backing Bean is Type of Managed Bean which contains one to one mapping to JSF Component.

However , Managed Bean hold data and logic for application. Managed Bean is defined in faces-config.xml , adfc-config.xml , taskflow.

ADF BC : Showing Attribute Label using Groovy

While throwing exception from BC Validator you can throw exception from Message Bundle with some custom message. However ,If you want to include some attribute label from control hint in your message then you can use following expression.



Tuesday, November 6, 2012

Sunday, November 4, 2012

PageDefinition Parameter

Your page might be dependent on multiple id from external source which may be in different scope and It is good practice to create temporary variable in page definition file and assign it with value coming from different scope , So you can access that variable from page using only one standard #{bindings.VariableName} instead of pageflow , session or application scope access. This provided more consistency in user interface.

I created following two variable in parameters section of page definition and assigned it value with #{sessionScope.variablename} and #{pageFlowScope.variablename} , Now I don’t have to access this two different scope from my user interface , But I have to access only #{bindings.DeptId} and #{bindings.ExternalId} which provided a good standard to adopt while developing application.


SetCurrentRowWithKey and SetCurrentRowWithValue

ADF Table component handle the selection of row automatically ,However in some cases  you may need dynamic row setting mechanism there comes above operations provided by framework SetCurrentRowWithKey and SetCurrentRowWithValue.

Both operation require parameter ,But following explanation will differentiate between them.


This operation require rowKey parameter and framework has already provided value in inbuild parameter i.e. #{row.rowKeyStr}.


This operation on other hand require value which can be OrderId for Order table , EmployeeId for employee table and similar primary key for identifying the row.

Example :-  I designed simple table –> detail page each on separate page and I binded Link with Key and two buttons with Value. So when I clicked link it went to particular row pointing to rowKeyStr and when I clicked button seperately it went to each row which was specified in button setting as depicted in below diagram.

Page definition three bindings that is called



Each button was called from User Interface as below.


Invoke Action in Page Definition

Before rendering of page results in to some output , You might want to run pre-requisite procedure or methods for performing business or criteria logic.


If you want to achieve this at User Interface level then mostly developers use “InvokeAction” provided by ADF framework.


I simply created FOD schema Order Table EO and VO with bind variable OrdId which I binded it with value in file and exposed it as client method.image

Then I added this method as InvokeAction which will be called before iterator in Executables box which will make sure it is called before the iterator renders OracleItem list on table component on User Interface.


Finally when you run the page it will only show rows with order id 1004. This was just for test purpose , you can use it for various reasonable business criteria.


If you have noticed I kept Refresh to IfNeeded that means it will call this method by default. You can also put some Refresh Condition that will prevent this criteria to be executed or allow the criteria to be executed based on some condition.

Thursday, November 1, 2012

Restricting ADF BC visibility in Consuming Project

Generally , We create multiple project in ADF and plug it to central project which will consume rest of ADF project as ADF library.

Sometime , You don’t want consumer to see the Business Component to be reused in consuming project because it may be dependent component in same sub project.

Hide the Visibility

Set the Library Private to “True” for EO object which will hide this object in consuming project and will not allow consuming project to utilize this object.


ADF Taskflow : Clean PageFlowScope

We used pageflowscope between pagefragment or other node in bounded taskflow. But when we exit the taskflow ,it does not get clear automatically. So in order to improve performance , we can clear the scope manually by calling the clear method.

Taskflow properties has two property Initializer and Finalizer which can be binded to method call . So we can write a method in managed bean which will clear pageflowscope variable while exiting taskflow.

Finalizer :-

public void cleanScope(){