ADF : af:query saved search issue

hi
Please consider this example application from Andrejus Baranovskis
http://jdevsamples.googlecode.com/files/UserCustomizationsSession.zip
(which he refers to from his blog post "User Customizations for Duration of Session in Oracle ADF 11g")
I see some strange behaviour with a saved search in this scenario:
(a1) open the UserCustomizationsSession.jws file in JDeveloper 11.1.1.1.0 and configure the "Hr" database connection in the Application Resources panel
(a2) right-click the main.jspx page in the ViewController project and click Run
(a3) on the "Index" page click the "Employees" button
(a4) on the "Employees Form" page, without entering any search values, click the "Search" button, which causes (all) the rows to show in the table
(a5) in the "Firstname" search field, enter "a" and click the "Search" button, which causes rows with "a" in their first name to show in the table
(a6) click the "Save..." button
(a7) in the "Create Saved Search" dialog, enter "my-a-search" in the "Name" field and keep the default values for the checkboxes ("Set as Default" checked, "Run Automatically" checked and "Save Results Layout" unchecked) and click "OK", which causes "my-a-search" to show up in the "Saved Search" dropbox
(a8) click the "Close" button
(a9) on the "Index" page click the "Employees" button, which causes the "Employees Form" page to show up with the results of "my-a-search"
(a10) in the "Saved Search" dropbox, select "EmployeesViewCriteria" and click the "Search" button, which seems to cause the table to refresh but still showing what seems to be the result of "my-a-search"
(a11) try to change the value of the "FirstName" search field or use the "Reset" button, each time the result of "my-a-search" shows up
question
(q1) Why don't I get all the rows in step (a10) instead of just "my-a-search"?
many thanks
Jan Vervecken

Hi Jan,
seems related to bug 8817108 - AF:QUERY DOES NOT WORK CORRECTLY WITH MUTIPLE VIEW CRITERIA
I'm copying below an except of the SR with possible workarounds:
The key point in the modified testcase is that we created a method in the
Application Module that resets the View Criteria of the View Object:
    public void unapplyViewCriteria() {
        String[] allVC = getViewObj1().getAllViewCriteriaNames();
        for (String vc: allVC )  {
            System.out.println("Unapply View Criteria: " + vc);
            getViewObj1().removeApplyViewCriteriaName(vc);
    }This method was published as a client interface and added to the bindings of
the Page definition (by a drag&drop from the DataControl palette):
    <methodAction id="unapplyViewCriteria" RequiresUpdateModel="true"
                  Action="invokeMethod" MethodName="unapplyViewCriteria"
                  IsViewObjectMethod="false" DataControl="AppModuleDataControl"
                  InstanceName="AppModuleDataControl.dataProvider"/>This created a button that we updated as the following:
        <af:commandButton
                          text="Go To Other Page AND Unapply View Criteria"
                          disabled="#{!bindings.unapplyViewCriteria.enabled}"
                          id="cb1"
                          actionListener="#{bindings.unapplyViewCriteria.execute}"
                          action="otherpage"/>This button will execute unapplyViewCriteria() and then navigate to the other page.
That's a first solution, where we unset the View Criteria just when navigating.
Another option is to unapply the ViewCriteria when the af:query has completed its query.
This can be done by the method we exposed in the aforementioned Note.
The method processQuery() in the backing bean is:
    public void processQuery(QueryEvent queryEvent) {
         * add your PreQuery code here
         * invoke the real processQuery
        invokeMethodExpression("#{bindings.NameStartsWithMQuery.processQuery}",
                               Object.class, QueryEvent.class, queryEvent);
         * add your PostQuery code here
        // Workaround for Bug 8817108
        BindingContainer bindings = getBindings();
        OperationBinding operationBinding = bindings.getOperationBinding("unapplyViewCriteria");
        Object result = operationBinding.execute();
    }where we first execute the standard processQuery, and then unapply the View Criteria.
If memory serves me well, customer opted for WA 2.
Regards,
Didier.

Similar Messages

  • Adf:Query - Saved Search issue

    Hi all,
    Using Jdev 11g. R1(Version 11.1.1.7.0) , I am getting the following error on returning to my UI's Advanced Search page after I add a field from 'Add Field" button and save it as a default search.
    *"Would you like to save the changes you made to the layout before proceeding?"*
    Any suggestion for debugging this issue.
    Thanks in advance..

    I believe you are encountering a usability issue. When you receive, "Would you like to save the changes you made to the layout before proceeding?", it is question not an error. You added a field and must have changed something in the results table (added a column, reordered column), and it is asking if you want to save the changes to the results layout table with your saved search. I think that may be what is going on here. I am not sure if you can disable this question, but you may be able to change the message itself to be worded differently.

  • Query on the af:Query - Saved Search Functionality

    Hi all,
    Using Jdev 11. R2, and what I think is the latest UI shell.
    Looking to tap some knowledge and to validate whether I'm heading in the right direction....... I also suppose this post relates to a broader topic on user sessions and what I think is referred to as 'state saving'.
    Firstly, I have an AF:Query which I can, for the life of my tasakflow save a particular search.... I'm keen to use this functionality (especially the automatically execute option), so that each user can save their preferred search and upon form load, see their particular list, rather than a blank search form.
    The issue is that once I restart the task flow the saved search does not persist!!
    Now I'm guessing this relates to state saving, and that there may be a global or template setting? I can see a property on the template 'State Saving' and I have tried setting this to client - and nothing happens....
    To further expand my question..... is it also possible that as a user changes their pages (through collapsing splittter and re-arranging table columns) that we can also have these selections persist?
    I just can't seem to find enough resources on this, and I suspect I'm searching with the wrong keywords, as I'm not 100% certain of the correct terminology.
    Cheers,
    Simo

    Simo,
    I guess you have to look for MDS or Meta data service. MDS stores changes to the ui like table layout and query state for each user in a central store (db or file).
    To use MDS you must use ADF security as this gives MDS the user ID.
    I can't search for more info right now as I'm not in front of my pc. Check the doc for MDS and you find more info.
    Timo

  • Af:query saved search not getting deleted.

    hi,
    I have a af:query component in which I am setting saveQueryMode="default".
    As per the docs, setting this value to default implies: "default: all saved searches are displayed. In addition any saved search can be created but only user saved searches can be deleted/updated."
    I fire a search on the query component and then save it as "mysearch".
    I then try to personalize it.
    However, here I don't find the Delete button enabled for it.
    I want the user saved searches to be deletable.
    Am I missing anything here?
    Thanks.

    Simo,
    I guess you have to look for MDS or Meta data service. MDS stores changes to the ui like table layout and query state for each user in a central store (db or file).
    To use MDS you must use ADF security as this gives MDS the user ID.
    I can't search for more info right now as I'm not in front of my pc. Check the doc for MDS and you find more info.
    Timo

  • Saved search issue with custom link

    Hi all,
    Generally we do have one opportunity search . But according to my requirement I have added one more opportunity search  for separate Opportunity type .
    I do have 2 different view configurations for regular search/result and newly added custom search/result.
    here the issue is with Archived Saved Search( those are saved in regular Opportunity Search)  is  not working properly when I am open custom Search and then open the saved Search( from Home Page) . Here again I need to open the regular opportunity Search and execute the Saved Search  then it is working.
    When I come out from custom search/result, then execute the Saved Search it is calling the configuration of Custom Search/result.
    here I need to destroy the custom configuration search/result when I come out or execute the saved search . already I tried the WD_DESTROY  method in Mainview set level. But it is not working .
    Regards.
    rama

    Solved my self.
    Below is the solution. Go to the Viewset implementation class ZL_BT111S_O_MAINVIEWSET_IMPL   and call the default configuration in method DO_CONFIG_DETERMINATION .
    CALL METHOD me->set_config_keys
       EXPORTING
         iv_object_type          = '<DEFAULT>'
         iv_object_sub_type      = '<DEFAULT>'
         iv_propagate_2_children = 'X'.
    regards,
    rama

  • Saved search Issue

    Hello Experts,
      I am facing following issue while searching the already saved search.
    When i select any saved search entry and click on GO, then it is displaying me standard Error Message "Entry 'ZZCHP_PERS_RESP' cannot be used: Configuration is missing search criteria"
    ZZCHP_PERS_RESP  is one of the Search criteria field which i have added.
    Following is the Screen shot for the same. It is not displaying any result and hence failing.
    The information about the Error message is also captured in the Screen shot. Message is from BSP_WD Message class, Msg Number : 009.
    Please help me where it is going wrong.
    Thanks and Regards,
    Nikhil Kulkarni

    Hi,
    Issue was solved by redefining the Inbound plug of the view and also with the help of the sap note 1948378. Below are the steps in redefinition of inbound plug(IP_SEARCH and Component name is BT112S_SC.)
    1.Call for the super method is commented to avoid the conflict.
    2.GET_GOREQUESTED() method of context node always returns abap true when we click on saved search link on work center. Copied the code of standard savedsearch_btn( ) method to the custom method zsavedsearch_btn( ) and commented the call to adjust_search_criteria_values() method (as per the suggestion from the SAP note 1948378).
    Below is the snap shot of the codes mentioned in the above 2 points.
    Thanks.

  • How to implement Quick Query and Saved Searches in ADF?

    We are using 11gR2 ADF.
    The requirement is to enable Quick Search and save the Searches.
    In the Oracle ADF documentation, it is mentioned that
    - Create a view with view criteria named.
    - In the .jspx drag and drop the view criteria and Select Quick Query
    Upon doing the above, we see that a Search panel is getting created, but with a message 'No Search Fields Added'.
    In the named view criteria, Under 'UI Hints' we have set
    -- execution mode as Both
    -- Search region mode is Basic
    -- Show Operators in Basic
    Under 'Criteria Definition'
    the attributes are added in a group with OR condition.
    Thanks for your reply. Oracle ADF developer guide does not help!!
    If you have any other documentation that helps in implementing this Quick Query and Saved Search, your help is greatly appreciated.

    Set the following on your af:query component
    SaveQueryMode = hidden
    ModeChangeVisible = false
    This should work for you ..
    Regards,

  • Need info on database based saved search in ADF

    Hi All,
    I am using jdev 11.1.1.6
    i have implemented database based saved search in my adf application.
    But after implementing it i am facing more performance related issues in my application.
    The page takes lot of time to load along with the previously saved results. Sometime the page is not responding even after a loading the results.
    Is there any option such that, i can save only the search criteria's alone instead of saving the result also for each saved searches.
    I assume ADF is querying separately for each saved search criteria's which is taking lot of time to load initially. So restricting this auto query will help to load the page quickly.
    some one please tell me ideally how ADF will behave in saved search and how to implement saved search based on DB without any performance issue.
    Regards
    Siva

    We are also encountering the same . Once we save criterias and set any of the saved criterias as default, then its not allowing us to select any other criterias or personalize existing criterias.
    we are using ADF 11.1.1.5 And we implemented saved search using accross sessions and storing the values in MDS by Running RCU in EM

  • Af:query - which client event is raised when selecting a saved search

    Hi Everyone,
    Is there a client event raised when selecting a different saved search in the af:query panel?
    I thought it would be propertyChange but that doesn't seem to work.
    Using JDev / ADF 11.1.2.1.0

    I can think of one way... Like Frank said, you could try hooking up a query operation listener in a backing bean and use QueryOperationEvent to get what you want.
    Then you could use the ExtendedRenderKitService to execute/inject javascript on the page.
    Would that work for you?Hi, thanks for sharing that.
    And I do appreciate that QueryOperationEvent would do the job in most cases, but there might be some cases where I would like to avoid a trip to the server if possible.
    Before considering workarounds I was trying to clarify the expected behaviour (i.e. +which of the client events if any, is intended to be raised when you switch a saved search?+)
    e.g. af:query raises the client event called 'query' (while on a server side managed bean you can listen for QueryEvent as mentioned earlier in the thread).
    [To quickly see the list of client events, you can add an af:clientListener under af:query and look at the available options]
    This 11.1.2 doc doesn't mention client events at all: http://docs.oracle.com/cd/E24382_01/apirefs.1112/e17491/tagdoc/af_query.html
    And the ADF client side architecture also doesn't list the specific events:
    http://docs.oracle.com/cd/E29049_01/web.1112/e16181/af_arch.htm#CBHJEJJG

  • PCUI Saved Search query Producing dump

    Hi Floks,
    We have Un Expected issue with PCUI Saved Search Query which were saved before support pack Implementation.
    Now when we select the old Saved Queries (saved Query before support pack Implementation) producing short Dump . Please find  the below Error Message
    Business Server Page (BSP) Error
    What happened?
    Call of BSP page terminated due to error.
    Note
    Following error text processed in system:
    An exception with the type CX_SY_IMPORT_MISMATCH_ERROR occurred, but was neither handled locally, nor declared in a RAISING clause
    Exception Class CX_SY_IMPORT_MISMATCH_ERROR
    Error name CONNE_IMPORT_WRONG_STRUCTURE
    Program CL_CRM_BSP_FRAME_SREQ=========CP
    Include CL_CRM_BSP_FRAME_SREQ=========CM00B
    ABAP Class CL_CRM_BSP_FRAME_SREQ
    Method DO_ONSHOWLIST
    Row 202 
    Long Text -
    Error Type: Exception
    Your SAP Business Server Pages Team
    If we Create a New Query with same parameter values , query working pretty good..
    Quick response will be appreciated
    Regards
    Raju..

    Hi Adil Imran
    Thanks for the update,
    Problem was resolved by self ...By developing new program to delete the Default Queries in the Search Option
    Regards
    Raju

  • Reorder Saved Search items in af:query component

    Hi,
    Is there any way to change the order of Saved Searches listed in the af:query component. The order that the view criteria are displayed in this component does not seem to have any relationship to the order that they occur in the VO.xml file, nor are they listed alphabetically.
    I'm only interested in ordering the view criteria in the choice list, that I have configured at design time.
    Is this possible?

    forgot to mention in my initial post that I'm using Jdeveloper 11g Rel 1.
    Thanks,

  • How to implement saved search delete feature in af:query

    Hi,
    I have implement MDS for af:query. However, delete button in "Personalized" window of af:query is still being disable.
    My test flow is the following:
    1) fire a search on the query component and then save it as "savedSearch1".
    2) then try to personalize it. Observed that "Delete" button in Personalize window is being disable. Not able to delete "savedSearch1"
    My question is: Is there a way for me to enable the "Delete" Button at the personalized window so that user can delete the saved search?
    I have af:query component with the following code:
    <af:query id="qryId1" headerText="#{uiBundle.SEARCH}" disclosed="true"
    value="#{bindings.KanbanCardSummaryVOCriteriaQuery.queryDescriptor}"
    model="#{bindings.KanbanCardSummaryVOCriteriaQuery.queryModel}"
    queryListener="#{KanbanSummaryBean.queryListener}"
    queryOperationListener="#{bindings.KanbanCardSummaryVOCriteriaQuery.processQueryOperation}"
    resultComponentId="::pc1:t1" maxColumns="2" rows="1"/>

    Hi,
    Does anyone knows the answer for this question?
    Thanks,
    Hong

  • Af:query with bind variables and Saved Search

    I have a VO and view criteria(VC).
    VC has a criteria item ObsoleteDate with range specified as bindVariables "dateFrm" and "dateTo" I dragged & dropped the named criteria as af:Query with table. Table toolbar has 2 buttons in which I set & clear the bind variables. Data is fetched as per as expected based on the VC & bind variables.
    The problem is,
    If I save my search with bind variables set and swap between the saved searches , all works fine. But the moment I clear bind variables & swap between searches.. "dateFrm" is populated and "dateTo" is null and I get an Exception oracle.jbo.AttrValException: JBO-27035: Attribute Obsolete Date: is required.
    Why is this happening?? Saved search is supposed to save the VC with all the bind values set while saving and clearing bind variables shouldn't affect the saved search, right?? Or I have understood it wrong?
    I am using JDeveloper 11.1.2.3.0
    Thanks

    Try
    like ? || '%'

  • What is a saved search query? And can I delete it?

    I was making some back up disk and created a Saved Search Query. Can the file that's on my desktop be trash? What exactly is this, and what is it's purpose.
    Greg

    Hi Gregory, and a warm welcome to the forums!
    It's an xml file with Aliases to a previous search criteria.
    Selecting "Find..." from the Finder's "File" menu (or typing another user-configurable keyboard shortcut, command-option-space by default) brings up an "advanced" Spotlight search window that includes a field for a search string (treated like the same string typed into the Spotlight menu bar drop-down search field) and any number of additional search conditions.
    Any search performed in this window can be saved as a "smart folder." This "folder" is actually nothing more than a plain file with a ".savedSearch" file name extension. The file contains an XML serialization of the Spotlight query.
    http://arstechnica.com/apple/reviews/2005/04/macosx-10-4.ars/9
    One way you can delete it by going to the Finder>File>Find, click on a Saved Search, click the little Minus icon...

  • Saved Search Query

    How do you edit a "Saved Search Query"?  It seems impossible.

    That's correct. All you can do is open one, change its criteria, and save it as another. Kind of useless unless you're constantly looking for just one thing. I have a generic one like this:

Maybe you are looking for

  • How many times can the same question be answered?

    Subject "Copy from client to client" in the SD forum today. I type a joking response after seeing multiple, almost exact same answers, and still someone posts the same answer again! How long do you think this can last ? I'm going to repost my answer

  • Exchange 2007 EXCDO 8206 error in Exchange 2007 SP2 with Rollup 4

    Dear sir,     We have a problem on Exchange 2007 Server. When user use OWA to access web mail calendar, server event log will show EXCDO error 8206: Calendaring agent failed with error code 0x8000ffff while saving appointment Type: Error Event ID: 82

  • Mainstage und Mac Book Air

    Does Mainstage  2.2.2. work with Macbook Air ? I1m working with  MacBook Pro  2,4Ghz  8 Gb  RAM, but sometimes the  Processor is  fully  employed  and  the  sound is  crushing, Has  sommebody  experience ? Thanks Gunter  ,   Detmold

  • How to type the "`" key?

    I have the "`" character in my wifi encryption passkey but I can't for the life of me find it on the keyboard. An alternative is if there is a way for me to configure the touch's wifi settings from within itunes.

  • Is it possible to have a link open as a pop-up window from an image map?

    Any help would be very appreciated! I'm new! Just point me in the right direction!