Tuesday, March 15, 2011

Double Click ADF Table Row Selection

I came across requirement where I need to write complex adf taskflow and show end result in af :table component in adf popup component.

However , when popup is displayed in adf user has habit to double click to select row. that led me to make my complex task flow to handle double click for row selection.

1.Develop simple ADF BC

2. Drag/Drop as table

3.Insert clientlistener inside table component and set client listener type to dblClick and give any method name that will be written in javascript

<af:clientListener method="takedblclk" type="dblClick"/>

So client listener will respond to double click on table component.

When user click double click on table component , row will set as current by table selection listener.

Moreover , java script is queuing server listener event using

AdfCustomEvent.queue(table, "TableDblClk",{},true);

that is calling server listener managed bean method where we can get the value of current row using iterator.

image

image

image

Now we can use this value for any purpose.

1 comment:

  1. Hi,

    I have exactly same code but current row always returns the first row of table irrespective of whichever row I select.

    ReplyDelete