Feb 21, 2015

Invoke double click action on Table or tree using javascript

To perform double click action on row of  tree or table , we have to use java script .

Drag n drop view object instance as af:tree or af:table from data source on Page

Now drag af:clientListner into tree , add Method name and Type

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

Add af:resource to use javascript method

<af:resource type="javascript">                   
function handleDoubleClick(evt) {                       
var table = evt.getSource();                       
AdfCustomEvent.queue(table, "DoubleClickEvent", {  }, true);                       

Now to perform server side action  we have to use af:serverListner

So,drag af:serverListner into tree and add Method name and Type 

Method name should java  method in bean class to perform action in java bean class.

<af:serverListener type="DoubleClickEvent"     

 public void DoubleClickOpen(ClientEvent clientEvent) {

    \\ Write your code here