2 Replies Latest reply on Apr 19, 2013 5:06 PM by User757151-Oracle

    Programmatically collapse queryPanel in an af.query

      I've a requirement where a page must:

      1. have an af:query with a search results table. (It must be an af:query because it must expose the names search criteria of the underlying View Object.
      2. the query panel must be disclosed by default.
      3. After the user executes the search by pressing the search button, the query panel must be collapsed so that the search results table is visible in the available real estate.

      The use case is due to there being only a limited amount of real estate.

      so i tried binding the af:query to a backing bean and then using setDisclose(). However, setDisclose() is having no effect on the UI. Is there something else/different i need to do.

      here is the backing bean code:
          private RichQuery af;
          public void setAf(RichQuery af) {
              this.af = af;
          public RichQuery getAf() {
              return af;
          private RichQuery af;
          public void setAf(RichQuery af) {
              this.af = af;
          public void myQueryOperationListener(QueryEvent queryEvent)
          throws Exception{
              ... //code that executes the search
              //this is where i attempt to collapse the search panel
              RichQuery richQuery = this.getAf();
              /* print to debug. isDisclosed() is returning false as expected, for what it is worth. */
              System.out.println("Disclosed set to " + richQuery.isDisclosed());
      here is the definition of the af:query - the queryListener attribute is bound to the above myQueryOperationListener() function :
       <af:query id="qryId1" headerText="Search"
            saveQueryMode="readOnly" disclosed="true"
      thanks for your help.

      Edited by: user757151 on Apr 19, 2013 9:16 AM