Workaround for disclosed af:query issue on ADF 12.2.1

Michael Koniotakis Oracle ADF 1 Comment

While migrating ADF applications from 11 to 12 we stepped on a known bug in ADF 12.2.1


Since this is not resolved yet we needed a workaround.

There were search criteria with disclosed=”false” in pages with rich layout that the user should expand it only if he wanted to search. So, having them disclosed=”true” would affect the layout greatly.

An option would be to surround the af:query with a disclosed panel box. Yet this would still affect the layout and would not look pretty.

We noticed that after we expand the af:query the functionality is restored if a resetActionListener were executed (e.g. with a rollback button).


We added a hidden button with a reset action listener and a javascript to be executed on the disclosure listener of the af:query.

  • The button on the page:
<af:button text="reset" id="resetb1" immediate="true" partialSubmit="false" visible="false">
  • The javascript:
function resetQuery(event) {
    var cmd= AdfPage.PAGE.findComponentByAbsoluteId("t:resetb1");
    if (cmd!= null) {
        var actionEvent = new AdfActionEvent(cmd);
  • In the af:query add the disclosureListener=”#{bean.disclose}”
  • and in the managed bean:
public void disclose(DisclosureEvent disclosureEvent) {
    if (disclosureEvent.isExpanded())   {
        ExtendedRenderKitService service = org.apache.myfaces.trinidad.util.Service.getRenderKitService(JSFUtils.getFacesContext(), ExtendedRenderKitService.class);
        service.addScript(JSFUtils.getFacesContext(), "resetQuery();");

Michael Koniotakis

I am in software development business for more than 15 years. I have been to all positions from Junior Developer to Project Manager. I am a partner in Nodalpoint Systems, and nominated with the Oracle ACE title on 2010.
Michael Koniotakis

Latest posts by Michael Koniotakis (see all)

Leave a Reply

Please Login to comment
1 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
Mohammad Hassonah Recent comment authors
newest oldest most voted
Notify of
Mohammad Hassonah
Mohammad Hassonah

Hello Michael, Thank you for this solution, as I have not found anyone else addressing this issue. I would like to share with you another solution that I have come up with: You can leave the af:query “disclosed” property set to “true” and put it inside an af:panelBox to have the same effect. Now, to remove the unwanted little disclosure component left from the af:query with the title row containing it, you should notice that the af:panelBox will be displayed as a “div” in html source, and the undesired title row will be displayed as a “table” with an auto-generated… Read more »