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();
        richQuery.setDisclosed(false);
        /* 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"
         value="#{bindings.MessagesJoinedVCAllMessageTextQuery.queryDescriptor}"
        model="#{bindings.MessagesJoinedVCAllMessageTextQuery.queryModel}"
        queryListener="#{backingBeanScope.testQuery.myQueryOperationListener}"
        queryOperationListener="#{bindings.MessagesJoinedVCAllMessageTextQuery.processQueryOperation}"
       resultComponentId="::resId1"
      saveQueryMode="readOnly" disclosed="true"
     binding="#{backingBeanScope.testQuery.af}"
    criterionFeatures="matchCaseDisplayed"/>thanks for your help.
Edited by: user757151 on Apr 19, 2013 9:16 AM

Which jdev version do you use?
add a ppr to the query component after setting the disclosure
// PPR refresh a jsf component
AdfFacesContext.getCurrentInstance().addPartialTarget(richQuery); It may be necessary to to ppr the af:panelHeader which is surrounding the af:query.
Timo

Similar Messages

  • Single-plot cursor tree -- how to programmatically collapse it?

    How do you programmatically collapse a single-plot cursor tree?
    I am saving and restoring waveforms to a waveform graph. Sometimes loading the waveform causes the cursor tree to display collapsed (Example 1), which is desired so the coordinates for both cursors are visible in the legend. However, some waveforms cause the cursor tree to display expanded (Example 2), hiding the lower cursor. I can't even figure out how to collapse it manually. Clicking the minus sign has no effect.
    Example 1.
    Example 2.

    I've made a mistake!
    I assumed the cursor-legend was really just a tree, but as it turns out NI has removed our ability to grab the cursor-legend reference since LabVIEW 7.1. Without a reference to the cursor-legend, we can't really do anything like what youre asking. Unless you can find a better answer, I'd recommend circumventing the cursor legend like suggested in this article:
    https://decibel.ni.com/content/docs/DOC-6495
    (you may want to rearrange the data into a tree control instead of a cluster array, in which case you'll be able to use my posted code, and you'll be able to manually expand/contract the nodes).
    Matt Kirk
    Inventor of ImageJVI

  • Programmatically Collapse and Expand Trays in WDA View

    I have 2 trays in my ABAP Web Dynpro View.  First tray is a filter selection tray and the second tray is a content tray where I will display the results based on the filter criteria user selected in the first tray.  When the user clicks OK in the filter selection tray, I want to automatically collapse the tray to make more rooms for the content tray.  Does anyone know how to collapse and expand the tray programatically?
    Your help will be really appreciated.
    Thanks!
    Pat Hong

    I made it work by adding the following code in WDDOMODIFYVIEW method:
      DATA lr_tray TYPE REF TO cl_wd_tray.
      lr_tray ?= view->get_element( 'TRAY_NAME' ).
          CALL METHOD lr_tray->set_expanded
            EXPORTING
              value = abap_false.
    Pat

  • Disable collapse for af:query component

    Hi All,
    Can anybody please tell me how to disable the collapse feature of the af:query component? I basically want it to be expanded every time.
    Thanks

    Hi,
    As your requirement it no need to disabled,and cannot disabled using provided attributes but you can set disclosed attribute to false.
    See for more
    http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e12419/tagdoc/af_query.html

  • How to hide Expand/ Collapse icon from ADF Query Panel.

    Hi Experts,
    I need to hide the expand collapse button from the ADF Query panel.
    is there any way to hide it.
    Please help me.
    Thanks in Advance.
    Balaji,

    Hi Balaji,
    Create a CSS file and the below code
    af|query.CustomQueryPanel::disclosure-icon-container { background-image: url("../img/minus.png"); display:none; height:0px; width:0px; }
    af|query.CustomQueryPanel::disclosed-icon { display:none; }
    af|query.CustomQueryPanel::undisclosed-icon { display:none; }
    Add styleClass="CustomQueryPanel" inside <af:query...>
    Now you can try...:)
    Thanks
    Prabhat

  • Querying a DBXML from Within

    Hi,
    I am relatively new to the concept of DBXML, but am loving every bit of it, especially our project is SOA based.
    My Question is that we can do this in shell
    dbxml>q 'collection()//x/string()'
    now what I want to ask is that, is there a way to store the Queries in kind of an XML file contained in a container using putdocument() such that we could do something like
    The Query.xml file
    <Q><q>collection()//x/string()</q></Q>
    the query in shell as
    dbxml> q 'let $i:=collection//q/string()
    return execute($i)'
    or something like that.
    Meaning the queries are stored in the DBXML container itself and are looked up as required and then executed, something like a view or Stored procedure functionality, so that we can keep these query files in container itself for better maintainability and manageability.
    Thanks

    Hi,
    Storing the queries as metadata inside a container may provide the functionality that you want. Metadata is information related in some way to a document but maintained separately.
    The string that represents the query can be stored as metadata for a dedicated document (this document can be an empty one, as it doesn't need to contain any information) that represent the query. You can retrieve the query string than use it to subsequently perform the get operations you want. The dbxml shell is somehow limited in that it doesn't allow you to redirect and execute the query represented by the string result of a previous query (contextQuery is used to query against the last results as the context item). So, you can implement this programmatically using one of the APIs available.
    Or you may want to store all your queries in a separate dedicated container.
    A short example in the dbxml shell would be:
    - store a query as metadata for an empty document inside the container:
    dbxml> setMetadata q1 "" querystring string "collection()//x/string()"
    - retrieve the query from the q1 document's metadata:
    dbxml> query "doc('container.dbxml/q1')/dbxml:metadata('querystring')"
    - programmatically you would use the stored query and execute it against the container; this could will imply XmlManager::query, XmlResults::next, XmlValue::asString and another XmlManager::query call, or alternatively using XmlQueryExpression::execute.
    Regards,
    Andrei

  • Tree component puzzle -

    Hello
    The example i am going to give is one of the issue that make me always wonder if ADF is the right framework for development. I might be of course wrong, it can only prove that we are not on the right track or there a lack of information either or our part or from the part of the Framework developers. We are using Jdeveloper 11g
    We have a simple requirement:
    Tree is to show the dept employees
    Tree node is to show the Emp employee (of course the emps corresponding to the master dept)
    This works nicely by following the standard tree implantation.
    Then it is required to show only employees who satisfy a certain condition (ie sal > 2000)
    We of course modified the EMP viewobject and added a viewCriteria . A been which is invoked by a button action executes the viewCriteria properly
    This is the puzzling results
    When you expand the tree node, all corresponding employees appear as if the where clause was not executed.
    We used the same Emp View object and added a normal table component side by side with the tree, the table shows filtered information as expected
    Findings
    1) We monitored the executed statement through V$SQL_AREA and found that the action is actually executed.
    2)We also found the another statement being executed which matches the dept employees with the emp employees but without the where condition (ie two statements are executed)
    One statement select * from emp where deptno = :deptn_no and SaL > :sal
    another state select * from emp where deptno = :deptno_no
    3) After more debugging, the first statement is executed upon button invocation and actually successfully filters the data, but the user cannot see the filtered data because the tree node is still in collapsed state
    4) when the user expands the tree to view the results, the other statement is executed , thus , overwriting the filtered data. and the user (also the developers) stays under the impression that the filtering was not done at all
    I don't see how the ADF architects think about it and how come they re-execute the VOlink this way.
    I will post it on OTN, but i am back to my original point, Should not this behavior be at least documented, and isnt this scenario a common want to warrant a more straight forward approach
    your thoughts
    Ammar Sajdi

    hello
    moh, we already know the reason , but it does not make sense that the framework takes over the behaves the way it wants.
    if you invoke the button, the viewCiriteria is executed, and the VO get filtered, and we verified the result be iterating through the ViewObject programmatically after the viewCriteria is executed.
    we tried the same with bind variable query, and faced other problems because when you expand the tree, NULL is assumed for the bind variable.
    However, when you try to expand the tree node (to verify if the VieWCriteria is executed or not). the Framework issues another query based on the association only (leaving the view criteria). the ADF has no right to mess up the filtered data. Additionally, i do not know why it is re=executing the query every time you open the node, this is not good for performance.
    Anyway, we solved in a bad way, through debugging, we noticed that the framework creates an additional VO programmatically (which i think represents the query of the association). We forced filteration on this VO programmatically, and it worked fine! But this is not a good workaround, because if later ADF changes this approach , the code would not work upon upgrade.
    The .NET team finished the assignment and did not face such obscure behavior. I think we should drop ADF altogether, it keeps surprising me and advice new adopters to be careful because they will be wasting lots of time guessing how things are done.
    and why should groovey need to work?
    ammar

  • RAS session count

    Hi,
    In my configuration, the RAS Java SDK is used to access some unmanaged reports stored in a server folder. In the same web browser session, it is noted that for each report opened, the CAS count will simply increment accordingly. Is that normal? Shouldn't the licensing be based on the RAS session connected? Is it related to my way of calling the RAS API?
    Thanks,
    John

    Answering what I can below in Italics.
    From the kb note, it seems I can programmatically (instead of interactively) invoke the query and kill the session, right?
    Yes
    Does that mean I also have to use the Enterprise SDK as well (in addition to the RAS/View SDKs)?
    Yes
    So an extra Enterprise logon (and thus a CAL session) is needed to kill the session?
    Not if you use the Enterprise Logon that you used to view the report, I believe it can nuke itself. I have not tried this.
    Assuming I can kill the session, but which session to select and kill? Is LOGONTIME is the nearest field for identifying my own session?
    I believe so, Adam may be able to answer this.
    Plainly speaking, what I want to achieve is when user closes the report browser window, his Crystal server session also ends accordingly. And a single web session corresponds to a single RAS connection session.
    Thank you,
    John

  • How to join 3 or more lists and create one single composite list or view in SP2010?

    HI
    I have 3 lists which has common field called -BARCODE. I need to link all these 3 lists by this ID and display a composite list
    which contains few columns of each list for view and edit. Is this possible? If not edit , can just view? report?
    Master list, list1 , list2
    (Master list --Left Join list 1 and Left join list2)
    Master list will be entered first then other lists.
    Thanks,
    JRS

    Hi,
    According to your description, there are three lists has a common field “BARCODE”, you might want to gather data from the three lists and populate into another list.
    The available OOTB features would not be able to meet your requirement, I would suggest you achieve it in a way programmatically using SharePoint Object Model, CAML
    query and Event Receiver.
    With
    SharePoint Object Model, we will able to access data in list/library:
    SharePoint Object Model -
    SPListItem class
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.aspx 
    Add, Update and Delete List Items Programmatically in SharePoint
    http://www.mindfiresolutions.com/Add-Update-and-Delete-List-Items-Programmatically-in-Sharepoint-372.php 
    More information about
    SharePoint Object Model:
    http://msdn.microsoft.com/en-us/library/ms473633.ASPX
    With
    CAML query, it can help us query the data with some specific conditions:
    http://sharepoint-works.blogspot.com/2012/05/caml-query-tutorial-for-sharepoint.html
    https://msdn.microsoft.com/en-us/library/office/ms467521(v=office.15).aspx
    The tool below would make it easier to compose query statement:
    http://www.camldesigner.com/?p=594#more-594
    Event Receiver, we can use it to monitor the events such as when item created, when item deleted etc.
    Here is a step by step sample on creating a simple Item added event receiver for Custom List in SharePoint 2010:
    http://msdn.microsoft.com/en-us/library/ff398052.aspx
    More information on Event Receiver for your reference:
    http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/ff408183(v=office.14).aspx
    Yes, to write the code, a Visual Studio installs on the machine which has SharePoint installed would be required, to get a quick start in SharePoint Development, I
    would suggest you take a look at the links below:
    http://blogs.msdn.com/b/erikaehrli/archive/2010/05/14/getting-started-with-sharepoint-2010-and-sharepoint-2010-advanced-developer-training.aspx
    https://msdn.microsoft.com/en-us/library/office/dn833463.aspx
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Patrick Liang
    TechNet Community Support

  • Advanced Search Interception

    I've got an Advanced Search that I need to intercept and do some pre-processing of the
    search criteria before search executes.
    I'd first like to add a input field to the Advanced Search UI that is not part of the
    view object attached to the Advanced Search model. If the user submits search data in
    this "new" field, I'd like to intercept that input data and use it to execute a query
    programmatically against a different view object. The results of this query will then
    "auto-populate" one of the other fields in the Advance Search model.
    In my AppModuleImpl, I notice the following method in my JHS generated application:
    public void advancedSearch(String viewObjectUsage, ArrayList arguments)
    super.advancedSearch(viewObjectUsage, arguments);
    I know I can "intercept" the Advanced Search process at this point, have access to any
    search input data from the user via the ArrayList of QueryArguments, and since this is in my
    AppModule, I also have programmatic access to my other view object.
    I have two things I don't understand how to do:
    (1) Add a "new" input field to the searchBean from my UIX Advanced Search page, so that I can
    capture my "new" non-model search field.
    (2) Create and add a new QueryArgument programmatically and add it to the ArrayList before calling
    the super.advancedSearch(..) method. Specifically, the QueryArgument constructor takes some args
    that I'm not familiar with (since JHS I think typically does this behind the scenes). Once my
    "new" query field is added to the searchBean (from (1) above), I can use this data to execute a
    query against another view object programmatically, and the results from that query will feed a
    a new QueryArgument that I'd want to programmatically build and add to the ArrayList.
    Are there any examples or tutorials of how to do this?
    Thanks,
    Timothy

    Timothy,
    The easiest way to do this, is to add a transient attrbute to the VO to get the additional input field in your search area. This attribute should have the queryable checkbox, but does not match a column in the underlying VO table.
    When you generate your app, JHeadstart will then add a search field for this transient attribute, and it will create a QueryAttribute for it when you press Find button. Then, by overriding advancedSearch in your app module, you can get this QueryAttribute from the arraylist argument and do your preprocessing.
    Steven Davelaar,
    JHeadstart Team.

  • Cube compression will affect any data availability

    Hi,
    have an issue where I have a user running exactly the same report with the same selection criteria but getting different results.
    The report was run from backlog this morning at 09:56 and again at 10:23. Although the batch was delayed, the data was actually loaded prior to 09:45. However, there was a cube compress running between 09:45 and 10:11.
    So, the first report was run during the compress, the second after the compress was complete.
    Could the compress process affect data availability to the end users? I can find no other explanation for this behaviour.
    Thanks,
    R Reddy

    Hi,
    one thing in advance: The next only applies to oracle databases. I have no experience with other databases.
    the compression will usually not affect the reported data. But in case of the user doing the reporting while the compression is ongoing, it is indeed possible that the query will deliver wrong results. The reason is, that the collapsing collects the data of the not yet collapsed infopackages into the F table. The query will usually start parallel processes on all the available infopackage E tables and on the F fact table. Because of the amount of data F- table is larger, so the job there will be the longest running. After collecting the results, the results are added up.
    Depending on the timing of the collapse run and the timing of the query it is possible that the collapsed data package was already successfully packed in the fact table, but the deletion of the infopackage was not completed (result: Key figures to high). Or alternativly the infopackage was already deleted but the F-table not completly commited - because of the query (result Key figures to low).
    All in all I would strongly recommend to do collapsing at times where no query is run on the cube.
    Kind regards,
    Jürgen

  • Web Application Designer - Analysis Item

    Hi Experts,
    We are using Analysis Iten property (Column From And Colum To) to display one few key figures from Query. This is because we are using same query for differnt Analysis items with differnt key figures.Now issue is we are having few key figure nodes collapsed in Quey designer. Analysis item is not considering the sub key figures of collapsed note. So whenever we expand a node a run time,the key figures at the end are not getting displayed. Please provide any solution for this issue.
    Thanks in Advance,
    Reshma M

    It is because the column numbering changes when you expand a collapsed keyfigure.
    Create a query view with the keyfigure(s) that you need for the analysis web item. Then use this query view for the analysis web item and remove the settings on Column From/To properties.
    Regards
    Francis

  • DAQmx 7.4 Input.OnbrdBufSize reports incorrect values

    I'm using a PXI-1042 chassis with six PXI-6115 DAQ boards. I'm using the DAQmx buffer property node to read the size of my onboard buffer for each card, but I'm getting incorrect results. I know what the value should be (16.7 Million samples). However, I get a value of 2.14 Billion samples for two or three of the cards and a value of 16.7 Million for the rest of the cards. If I reboot the system, the values are stay the same, but are returned from different cards. For example: If I read the Onboard buffer size from each card, the values would be 2.14Gs, 2.14Gs, 16.7Ms, 16.7Ms, 2.14Gs, 16.7Ms for cards 1, 2, 3, 4, 5, and 6 respectively. I then reboot the system and get: 16.7 Ms, 2.14Gs, 16.7Ms, 16.7Ms, 2.14Gs, and 16.7Ms.
    Does anyone have any suggestions as too why I'm getting the wrong values?
    Any suggestions would be greatly appreciated.
    Thank you,
    Jeremy

    Alex,
    Thanks for responding. I am using an embedded controller. Its the PXI-8187. To get a value of 16.7 Ms, I'm using the DAQmx buffer property node and asking for the onboard buffer size from each PXI-6115 module. I've tried getting the property two ways. The first thing I did was create DAQmx channel constant and programmatically create a task, followed by querying the onboard buffer size. Second, I created six tasks in MAX, each corresponding to a different 6115 module. I then called all six in parallel. Both methods yielding the same result. In response to your second question: I cannot duplicate the problem with just one board. For example: I uninstalled all six cards and removed their registry entries. I then installed one at a time, and each time rebooted the system to see the results. With just one board installed, I didn't seem to have a problem. As soon as I installed the second board, I began getting the weird value of 2 Gs. I proceded to install one board at a time. Its seems that every time I reboot the computer I get different values.
    I talked with NI. They can't duplicate the error. They suggested that I may need to reinstall my drivers.
    Jeremy

  • How to modify a ViewObject Query programmatically?

    Hello,
    I have the following case. A SQL-query of an EO-based VO is defined by design in the Jdev wizard by default.
    That works in most of the cases. However, sometimes I need to programmatically filter the results by changing the content of the query.
    Sometimes this filter applies to inner queries inside the default SQL query. Sometimes it's NOT as easy as extending the where clause with the VO API.
    The best for me would be to use placeholders, like bind variables, but with a different meaning specific for the text of the query itself.
    These placeholders should be replaced with other SQL text programmatically. Is there a way to this with the features of the framework?
    thank you

    Did you execute query again after setting where clause? Take a look at the following (wrt applying ViewCriteria).
    Video: http://www.youtube.com/watch?v=04ZpxEn-xeA
    Doc: http://www.adftips.com/2010/10/adf-model-programmatically-executing.html
    Can't you make use of view criteria instead of executing the query again?
    Edited by: Vinay Agarwal on Feb 23, 2012 8:57 PM

  • Changing a Programmatic View Object's query at run-time

    Hi,
    I've created a programmatic View Object using the information in '35.9.3 Key Framework Methods to Override for Programmatic View Objects' in the Oracle Middleware Fusion Guide and bound it to a BarChart. This has worked fine using the following:
    String myColumn = "Quant1";
    protected void create() {
    getViewDef().setQuery(null);
    getViewDef().setSelectClause(null);
    setQuery(null);
    String myQuery = "SELECT Service as MyService, " + myColumn + " as MyValue FROM ColumnTestTable WHERE 1 = 1";
    getViewDef().setQuery(myQuery);
    setQuery(myQuery);
    I also have my data updating automatically. I have public properties in my viewObjImpl class which I can set and update the value of myColumn. I then thought it would just be a case of re-calling the create() method and the SQL would be updated and my chart would auto-update using the new column to select it's values, the value of the property updates and the create method is called but the chart doesn't display any different data and stops auto-updating. Does anybody know if this is possible and if so what I may have missed?
    Cheers, Tom

    Hi Timo,
    I moved everything to a different public method and solved the problem by firing the execute() method which I hadn't been doing previously and the chart updates with the correct data.
    However, once I execute the SQL my chart stops auto-updating with changes to the data in the database - do you know how I update the SQL query but keep my chart auto-updating? Perhaps I have to re-register for the registerDatabaseChangeListener for the query collection?
    Thanks in advance, Tom

Maybe you are looking for

  • Unable to detect new Sanyo PLV-Z5 projector

    I just got a new projector and made a presentation on Keynote match the resolution of the projector 1280 x 720. My Imac G5 will not detect the projector and give me the arrange, mirror, etc. questions despite trying to connect the projector with the

  • What if I purchased an iPhone app instead of an iPad app

    WhaT if I purchased an iPhone app for my iPad instead of an iPad 2app?  Can I exchange it in the app store or do I need to just buy the right app? I realize it was my fault...I am new to buying apps at the  iTunes store

  • Logic 7.1.1-OSX 10.4.3 freeze on launch

    I've just updated my OS and Logic and now can't get Logic to open. It freezes at setting up memory buffers. I've repaired permissions, updated to Pro Apps 3.1, and ran Tech Tool to no avail. I unplugged the XSkey when launching and it loaded all the

  • HTMLDB on Oracle Lite?

    Hello, we have a customer that likes to migrate an application from Lotus Notes to an Oracle DB with HTML DB as front-end. However, they'd need some data replication and editing functionality for off-line work of sales people in the field. Therefore,

  • VERY!!! Noisy Fan of RD240

    Hi, Even at the lowest speed of 30% the 4 fans of the RD240 makes such a noise i can hardly stay longer than 10 minutes in the room where this server is located, in a range of 15meters i still can hear the fans blowing!!! (When running at 100% speed,