Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Javascript function not defined in ADF page

Rajan MApr 5 2013 — edited Jun 19 2013
I am using JDeveloper 11.1.1.5.0.

In my ADF page, I need a table row double-click listener. For that, I am using a combination of <af|clientListener>, <af|clientAttribute> and <af|resource> in my page.

When i run the application, my page is loading correctly. but when i refresh the page by 'F5', my page gets hanged.

I checked with i firebug and found that the javascript function 'handleTableDoubleClick' is not added to the page after refresh. So I am getting an 'handleTableDoubleClick is undefined' error. and it is causing my page to hang.

I tried putting the <af|resource> tag inside table, or root component of the page, but it is not working. below is the code
<af:clientListener method="handleTableDoubleClick" type="dblClick"/>
                   
<af:clientAttribute name="btnId" value="#{SuspectBean.overviewButtonId}"/>

<af:resource type="javascript">
     function handleTableDoubleClick(event) {
         var btnId = event.getSource().getProperty("btnId");
         var button = AdfPage.PAGE.findComponentByAbsoluteId(btnId);
         var actionEvent = new AdfActionEvent(button);
         event.cancel();
         actionEvent.queue(button, false);
     }
   </af:resource>
How can i correct this issue?

regards,
Rajan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 17 2013
Added on Apr 5 2013
7 comments
1,461 views