Thursday, October 27, 2016

Issue with ADF Popup Fetch Listener

Issue when popup fetch listener is added

Issue


  While working with ADF popup the developer wanted to use ADF buttons instead of the default buttons generated by af:dialog. 

 Method binding for  Popup fetch listener was added on af:popup

  Dialog type was set to none and two command buttons (Save and Cancel) were placed in the af:dialog .

 Save button was data bind with Commit operation and for Cancel an action listener method was added which is placed in Managed bean.

Code in the page now should look like the below screenshot.







Once the user clicks on Save and Close, it was all fine, the records were saved to the database and reflected in the UI.

But the issue was with Delete button, the action listener was never called. At first I thought I missed the debug code :) but to my dismay it was not the case.

After much of debugging I realised that there is nothing wrong with the button nor the action listener method.

Solution


Removed the method binding for popup fetch listener and the delete button started to work as expected.

I am not sure whether this is the solution or this is the way af:popup/af:dialog works.  I might be very naive in not knowing this behaviour as well.

No comments:

Post a Comment