Thursday, October 17, 2013

How to implement Select Many Choice feature using ADF Faces, How to use single 'View Object' to display multiple set of list of values using ADF Faces ?



This blog explains about implementing select many choice component as well as capturing the selected values in backing bean.

Scenario : Display two select Many choice components, with different set of list of values by passing bind parameter value to View object dynamically.

Implementation

Step :  Create View object with a bind parameter as shown below,In this example I am using Read only view object with a single bind parameter, and same view object can be used to display multiple select many choice components with different set of values.


Step - Shuffle the Read Only View object to right hand side of Data Model in Application Module as shown below, In this example, I am going to create two instances of same view object, but different bind parameters to each VO instance.

Step - As shown below , Select the View Object instance in right hand side of the data model, Click on 'Edit' button as shown below

Step - Set the corresponding bind parameter value as shown below.


Step -  This his how you see two View object instances available in App Module.


Step - Select the View Object instance in Data Control section, Drag it on to the page as Multi Selection -> Select Many Choice as shown below.

Step - Bind 'Value Change Listener' to backing bean as shown below in order to keep track of selected values


Step - Below is how screen looks like, Try selecting multiple values , you should see selected values in value change listener method.


No comments:

Post a Comment