Thursday, May 26, 2011

ADF GUI : Selecting Multiple Row in af:table

 

There is business requirement sometime to select multiple row from af table component and do some operation during button click.

There are various ways of doing that and I will try to extend this same blog post in trying to explain you various ways.

1. First approach to select multiple rows.

In this approach we will have following things.

a. create simple ADF project and drag and drop regionview object from sample HR schema to JSF page as table and select the following radio button for multiple select which is not available in previous version of jdeveloper. So if you are using other version of jdeveloper then delete SelectionRowKey  and set rowselection to multiple.

image

Here is table definition

image

Three important property here is

selectionListener ,  rowSelection, binding

Now we will place some button to print multiple row selection.

Don’t forget that we need to have binding for table component in managed or backing bean.

image

Write this following code in button action or actionlistener method.

I have given adequate explanation in commented part.

image

I selected multiple region and it printed in the log window.

I will post other ways of doing same thing in different adf layer tommorow.

No comments:

Post a Comment