7 Replies Latest reply on Jun 19, 2013 6:01 PM by KT

    Javascript function not defined in ADF page

    Rajan M
      I am using JDeveloper

      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);
               actionEvent.queue(button, false);
      How can i correct this issue?