Reacting to af:query search event

I need to disable/enable page elements based on the execution of an af:query control in a page.
I tried calling a method in managed bean that accepts a QueryOperationEvent parameter. I get a NullPointerException in:
oracle.adf.model.binding.DCIteratorBinding.getApplicationModule
before the page even renders if I set the QueryOperationListener property for the control. I am using the binding editor in JDeveloper to set this property so I assume the property value it generates is syntactically correct: #{SalesentityMenuHandler.handleQueryEvent}
SalesentityMenuHandler is a managed bean that I am referencing successfully elsewhere in my code.
Any ideas why this doesn't work?
Any suggestions on another approach for doing what I need to do? (call a method somewhere when the search button is hit).
Dave

In case this comes up for anybody else, here is what I ended up doing:
- I set the QueryListener propery of my Quick Query to a method in a managed bean
- in the method in the managed bean, I did what I needed to do to the page components and then invoked the processQuery binding using this:
JSFUtils.invokeMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}", Object.class, queryEvent.getClass(), queryEvent);
- invokeMethodExpression is a method in my JSFUtils class that I 'borrowed' from Frank Nimphius/Steve Muench:
   public static Object invokeMethodExpression(String expr, Class returnType, Class[] argTypes,Object[] args){
           FacesContext fc = FacesContext.getCurrentInstance();      
           ELContext elctx  = fc.getELContext();
           ExpressionFactory elFactory = fc.getApplication().getExpressionFactory();      
           MethodExpression methodExpr = elFactory.createMethodExpression(elctx,expr,returnType,argTypes);      
           return methodExpr.invoke(elctx,args);      
   public static Object invokeMethodExpression(String expr, Class returnType,Class argType, Object argument){    
       return invokeMethodExpression(expr, returnType,new Class[]{argType}, new Object[]{argument});
   }Thanks Frank and Steve for coming up with this stuff and sharing it with us!
Dave

Similar Messages

  • How to use ADF Query search with EJB 3.0

    Hi,
    In ADF guide http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/web_search_bc.htm#CIHIJABA
    The steps to create query search with ADF Business Components says:
    "+From the Data Controls panel, select the data collection and expand the Named Criteria node to display a list of named view criteria.+"
    But with EJB, I'm not able to find Named Criteria node. Can we use ADF query search component with EJB? If yes, can you please show me some example, tutorial etc.?
    Thanks
    BJ

    For EJBs you'll need to implement the query model on your own.
    An example of how the model should look like is in the ADF Faces components demo.
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/query.jspx
    Code here:
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/demo/adf_faces_rc_demo.html

  • Is it possible to submit a list item and at same time query/search the results if parameters are matched.

    Hello,
    Is it possible to submit a list item and at same time query/search the results if parameters are matched.
    Example - user logon to site enter search parameters and hit submit button. Once done parameters gets saved in list and shows search results on page. I have been asked to do this with
    SP designer and InfoPath doesn’t work due items limits.
    Please suggest.
    Thanks,
    Manish
    Manish

    Hi Manish,
    may i ask if you need,
    when user account click the login button, it will be authenticate the user and then it will show search result page?
    may i know how the keyword of words to be put? is it together with the user account box, password and keyword?
    or it will be like, after user authenticate, it will redirect to search page, so that user may use the search page to input the keyword?
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How to Automate the Query Search Upon Return to the Calling Form?

    Greetings Ya’ll Gurus,
    Could you please share with me how to make the Query Search executed automatically each time, when database table is updated, upon return to the “Calling Form” (i.e. FormA in this posting) from the “Called Form” (i.e. FormB from here on)?
    I have FormA call_form to FormB. FormB may return to FormA. FormA allows users to enter the Query parameters and perform query Search to the database table with a list of search results afterward; whereas FormB allows users to add or delete the same database table records. Both form images are as follows:
    FormA:
    !http://dot.state.ak.us/nreg/jtomasic/FormA_DWR_SEL.GIF!
    FormA call_form to FormB by clicking PB “Daily Work Report” (see circled PB "Daily Work Report" in the above image.)
    FormB Image (FormB allows users to add and delete database records):
    !http://dot.state.ak.us/nreg/jtomasic/FormB_DWR.GIF!
    FormB EXIT_FORM and returns to FormA (see circled PB "DWR Selection" in above image).
    Currently, our users must press the PB “Search” on FormA each time to refresh the Query “Search” results after returning to FormA, and they request to have the "Search" done automatically/programmatically upon return to FormA each time when the database table is updated.
    If you have programming code on this and are willing to share or if you have any suggestion or thoughts on this, it would be most greatly appreciated.
    Thanks a lot & Happy Holidays!

    Thanks so much Andreas, and yes, your link for calling a form and passing a context is very helpful. I believe, your suggested use of the global variable for the saved database table will work for the automation of the Query Search. I am, however, not sure how to make the code and the trigger to automatically perform Query PB "Search". The code for our current "WHEN-BUTTON-PRESSED" Trigger for the PB-Search of FormA is as following:
    DECLARE
         alert_button     NUMBER;
         alert_id               ALERT;
      MY_WHERE VARCHAR2(2500);
      MY_DIST_ID         DIST.DIST_ID%TYPE     := :BLK_UPDATE.DIST_ID;
      MY_ORG_ID          DWR.ORG_ID%TYPE       := :BLK_UPDATE.ORG_ID;
      MY_ACTY_ID         DWR.ACTY_ID%TYPE      := :BLK_UPDATE.ACTY_ID;
      MY_ACTY_WORK_ID    DWR.ACTY_WORK_ID%TYPE := :BLK_UPDATE.ACTY_WORK_ID;
      MY_CNTY_ID         DWR.CNTY_ID%TYPE      := :BLK_UPDATE.CNTY_ID;
      MY_ASSET_GRP_ID    DWR.ASSET_GRP_ID%TYPE := :BLK_UPDATE.ASSET_GRP_ID;
      MY_ASSET_ID        DWR.ASSET_ID%TYPE     := :BLK_UPDATE.ASSET_ID;
      MY_RTE             DWR.RTE%TYPE          := :BLK_UPDATE.RTE;
      MY_BEG_MP          DWR.BEG_MP%TYPE       := :BLK_UPDATE.BEG_MP;
      MY_END_MP          DWR.END_MP%TYPE       := :BLK_UPDATE.END_MP;
      MY_FROM_DATE       DWR.DWR_DATE%TYPE     := :BLK_CONTROL.FROM_DATE;
      MY_TO_DATE         DWR.DWR_DATE%TYPE     := :BLK_CONTROL.TO_DATE;
      MY_FLAG_OFFSYS     VARCHAR2(11)          := :BLK_UPDATE.FLAG_OFFSYS;
      MY_FLAG_COMMENTS   VARCHAR2(11)          := :BLK_UPDATE.FLAG_COMMENTS;
      MY_SPECIAL_EVENT_SEQ_NO SPECIAL_EVENT.SPECIAL_EVENT_SEQ_NO%TYPE  := :BLK_UPDATE.SPECIAL_EVENT_DESCR;
      MY_FLAG_ACCDT      VARCHAR2(11)          := :BLK_UPDATE.FLAG_ACCDT;
    BEGIN
    :blk_control.dummy_flag := 1 ;
    :BLK_CONTROL.DUMMY_ERR_FLAG := 'N';
    VALIDATION_SELECTION;     -- Program Unit VALIDATES DWR SELECTION PARAMETERS PRIOR TO
                                                    -- PERFORMING THE SEARCH AND POPULATING THE DISPLAY BLOCK
    if :blk_control.dummy_flag = 1 then
      IF :BLK_CONTROL.DUMMY_ERR_FLAG = 'N' THEN
        MY_WHERE := BUILD_WHERE_CLAUSE(MY_DIST_ID,
                                       MY_ORG_ID,
                                       MY_ACTY_ID,
                                       MY_ACTY_WORK_ID,
                                       MY_CNTY_ID,
                                       MY_ASSET_GRP_ID,
                                       MY_ASSET_ID,
                                       MY_RTE,
                                       MY_BEG_MP,
                                       MY_END_MP,
                                       MY_FROM_DATE,
                                       MY_TO_DATE,
                                       MY_FLAG_OFFSYS,
                                       MY_SPECIAL_EVENT_SEQ_NO,
                                       MY_FLAG_ACCDT,
                                       MY_FLAG_COMMENTS);
        SET_BLOCK_PROPERTY('BLK_DISPLAY', DEFAULT_WHERE, MY_WHERE);
        GO_BLOCK('BLK_DISPLAY');
        CLEAR_BLOCK(NO_VALIDATE);
        EXECUTE_QUERY(ALL_RECORDS);
        IF :BLK_DISPLAY.DWR_SEQ_NO IS NOT NULL THEN
                   SET_ITEM_ON_OR_OFF('BLK_CONTROL.PB_PRINT', TRUE);
        ELSE
                   SET_ITEM_ON_OR_OFF('BLK_CONTROL.PB_PRINT', FALSE);
                   alert_id := FIND_ALERT('no_data_query');
                   IF ID_NULL(alert_id) THEN
                        error_msg(1000);
                   ELSE
                        set_alert_message(alert_id, 1040);
                        alert_button := SHOW_ALERT(alert_id);
                   END IF;
              END IF;
              GO_BLOCK('BLK_UPDATE');
              GO_ITEM('BLK_CONTROL.PB_SEARCH');
         END IF;
    end if;
    END;My questions are:
    After initializing, set and/or reset the global variable for the saved database table,
    do I copy the above code (i.e. the "entire" code in the "WHEN-BUTTON-PRESSED" Trigger for the PB-Search) to the WHEN-NEW-FORM-INSTANCE-trigger, or other trigger(s), of FormA to automate the Query Search whenever there is a successful database commit/save? Or
    is there a simple way to activate the code in the "WHEN-BUTTON-PRESSED" Trigger for the PB-Search of FormA? Or
    is there a simple way to activate the EXECUTE_QUERY(ALL_RECORDS) command in the WHEN-NEW-FORM-INSTANCE-trigger or other trigger(s) of FormA ?
    Thanks and always.

  • How can I search events inside my calendar with Lightening enabled?

    I have Lightening enabled in Thunderbird. I have all my calendars working. I just can't see any way to search events. All my toolbars are selected. I see no search function. Is there one? Can someone offer assistance? Thanks!

    Clarification: Search is not a problem on the email side...but I cannot search my calendar events. Looking for help.

  • Form query/search issue F6 , F11 + Ctrl F11

    Dear Techies,
    I have an issue with form query/search mode in oracle applications. The Issue is i have a custom form which has headers and lines. whenever i open the form cursor is defaulting on a column called "Transaction_year" which is a mandatory column, Because of this whenever i want to search first I have to clear the record (Press F6) then press F11 and CTRl F11.
    And my client is irritated to press so many buttons. I cannot make mandatory col to optional since it is "Transaction_year" a primary key. I have to customize the form in such a way that it should allow f11 + ctrl f11 to search.
    Can somebody help me how can i achieve this. I am new to forms :(

    I have written this code in form level - when new form instance trigger
    go_item('XXDOF_PA_PRJCST_HEADERS.FIN_APPRVER_DEPT');
    this is a optional field ... and when when i open form it is defaulting to this ... still f11 + ctrl f11 is not working ... i have to clear it (f6) and then press f11 + ctrl f11

  • ADF Query Search

    What kind of query search is implemented in ADF Query components(ADF Query, ADF Query with Table) ?

    The query component provides the user the ability to perform a query based on a saved search or personalize saved searches. The component displays a search panel with various elements, each of which help the user to accomplish various tasks.
    Elements rendered by the query component
    Search Panel: the panel that encloses all elements rendered by the query component
    Search Header: Spans the entire width of the search panel and used to display a disclosure icon, the label, search mode (toggle button) and saved search (choice list of saved searches). The help (deprecated), info and toolbar facets' content is also displayed in the header.
    Match Type: A radio button group that appears below the search header, it defines whether the search criteria should be treated as an AND search or an OR search. For details on the conjunction operators refer to the QueryDescriptor and ConjunctionCriterion classes.
    Criteria region: A form layout that appears below the Match type, it contains search fields that define the search parameters. For details on search fields refer to the QueryDescriptor model.
    Criterion: A criterion represents a single search field, that comprises of an operator and one or more value fields. For value fields that render LOV components, the autoComplete feature is not enabled unless either of the methods, AttributeCriterion.hasDependentCriterion() or ListOfValuesModel.isAutoCompleteEnabled() return true. This is done to allow the end-user to enter partial values with wild-cards and tab around the search panel without causing the LOV dialog to be launched (everytime they tab-out of the LOV value field).
    Action buttons: The search panel has four action buttons: Search, Reset, Save, and Add Fields. The action buttons appear below the criteria region. They are end-aligned within the search header.
    NOTE: The Add Fields feature is only available in the Advanced mode.

  • Extending SalesOrder Query search on MSR 2.0

    Hi all,
    I need to extend query search for sales order by adding a date range (FROM - TO in place of a single date field DATE_DOC). But the DATE_DOC_HIGH custom field has not a FieldDescriptor so it's not possible to call:
    searchKeys<i> = getFieldDescriptor("DATE_DOC_HIGH"); //->>returns an Exception
    (where 'i' is the Condition number index)
    It's possible to clone the FieldDescriptor of the standard field DATE_DOC, and modify its KEY and VALUE in order to fill it with those of DATE_DOC_HIGH?
    The standard code that run the query is this:
    conditions[j][0] = queryFactory.createCondition( searchKeys<i>,
                                                                          criteriaTypes<i>,
                                                                         tmpSearchCondition<i>.getDateValue());
    Does anybody know another way to fullfill this goal?
    Thanks in advance,
    GB

    Hello,
    I am not sure I am getting the question. Normally you have to create to condition on the date field one with DATE > input date 1 and DATE < input date 2.
    You create a composite condition and query with it directly. No need for a custom field as they cannot be used for querying (if they are not in the syncbo def).
    Thank you,
    Julien.
    msc mobile Canada
    http://www.msc-mobile.com

  • Af:query search page i have, in my result table on command is there ,i.e ID

    af:query search page i have, in my result table on command is there ,i.e ID
    when i am clickeing on a ID ,regarding id related details EDIT page i want display.
    i need code and process of this USECASE.
    Please replay ASAP

    User,  without a jdev version and an understandable user case we can't help.
    Timo

  • Outer join two tables with query search record attached to both tables

    When I create a query with two tables that have query search records attached with outer join, PS seems to do a natural join (cartesian). We are on PT8.48.
    Is there a workaround for this issue. I do not want to remove query search record on either of the tables.
    I am trying to create an Emergency contact report. I am using two tables PS_EMPLOYEES and PS_EMERGENCY_CNTCT. Here is the sql PeopleSoft query generated when I did Left outer Join.
    Query SQL:
    SELECT A.EMPLID, A.NAME, A.ADDRESS1, A.CITY, B.PRIMARY_CONTACT, B.ADDRESS1, B.CITY, B.STATE, B.POSTAL, B.RELATIONSHIP, A.DEPTID, A.JOBCODE, A.COMPANY, A.EMPL_TYPE
    FROM (PS_EMPLOYEES A LEFT OUTER JOIN PS_EMERGENCY_CNTCT B ON A.EMPLID = B.EMPLID ), PS_EMPLMT_SRCH_QRY A1, PS_PERS_SRCH_QRY B1
    WHERE A.EMPLID = A1.EMPLID
    AND A.EMPL_RCD = A1.EMPL_RCD
    AND A1.OPRID = 'SREESR'
    AND (B.EMPLID = B1.EMPLID OR B.EMPLID IS NULL )
    AND B1.OPRID = 'PS'
    Appreciate any help.

    I think there are fixes for this issue in later tools releases (Report ID 1544345000). I'm not sure about 8.48, but you might try the workaround documented in
    E-QR: Left Outer Joins with Security Records are returning unexpected results [ID 651252.1]
    on Oracle Support.
    Regards,
    Bob

  • Help understanding simple query trace with 35,000 "query subcube" events

    No matter WHAT query I issue against my cube, I'm finding thousands of query subcube events against an unexpected , I assume it's a partition.
    Even for the simplest possible query SELECT FROM <CUBE>, which for this cube would return the measure [MRN Distinct Count], a trace reveals 35,000 query subcube events against a partition (?) called "<server>.Medical Home.MedHome.Lab Orders
    With Results" which is NOT the partition that holds that [MRN Distinct Count] measure.
    I can't figure out why this object is being queried so many times for queries completely unrelated to it.  I believe this performance degradation is somewhat new...so I have been trying to think of what may have been added to the cube recently.
    I recently added KPIs and calculated sets & members that DO draw from that Lab Orders With Results object...would calculated members or KPI's cause this kind of problem? I thought that they were all pre-calculated @ processing?
    Thanks for any insight you can provide
    Here's a summary of the profiler trace on the query SELECT FROM <CUBE>
    Event Desc
    # of Events
    ObjectPath
    Duration
    Query Begin
    1
    NULL
    0
    Query Cube Begin
    1
    <server>.Medical Home.MedHome
    0
    Query Subcube Verbose
    11
    <server>.Medical Home.MedHome.Fact Dx 2
    189
    Query Dimension
    7
    <server>.Medical Home.Dim Person
    0
    Query Subcube Verbose
    35650
    <server>.Medical Home.MedHome.Lab Orders With Results
    13856
    Serialize Results Begin
    1
    <server>.Medical Home.MedHome
    0
    Serialize Results Current
    4
    <server>.Medical Home.MedHome
    0
    Query Subcube Verbose
    5
    <server>.Medical Home.MedHome.Dim Person
    0
    Serialize Results Current
    1
    <server>.Medical Home.MedHome
    0
    Serialize Results End
    1
    <server>.Medical Home.MedHome
    0
    Query Cube End
    1
    <server>.Medical Home.MedHome
    40919
    Query End
    1
    NULL
    41059
    Paul

    RedBirdRising - my cube had several dynamic calculated sets in it.  As I recall several of those sets included slices on that one particular dimension that was being queried so many times. For me it was sets that compiled populations of people
    with particular lab result values, so that lab result partition was queried thousands of times for ANY query, even simple ones like SELECT FROM [CUBE].  
    To be precise, I actually had calculated sets interacting with calculated measures - for example, one of the offending calculated sets was really this series of calculations:
    -CALC SET 1: define calculated set of diabetic patients
    -CALC MEASURE 1: define calculated measure for most recent lab test result of a particular lab test - which included a slice on the dimension I found being queried thousands of times.
    -DYNAMIC calculated set: FILTER(CALC SET1, CALC MEASURE 1 <= x)
    So as soon as I switched that dynamic set to a STATIC set my queries began executing in a reasonable amount of time and those query subcube events were no longer issued in the thousands.  I feel like i've heard that FILTER performs poorly but didn't
    know of any alternatives to achieve what we needed.
    hope this helps...I can't say I know for sure what unforseen impact(s) switching to static sets has had yet.  Dynamic seemed like the way to go but the performance hit was just too drastic.  
    Paul

  • A Query regarding 'Events' published and 'Event' subscribed

    I have a query regarding 'Events' and 'EventHandling' in Java Swing.
    Swing in an EVENT based application whereby 'events' are generated
    by interacting with the components.
    Eg: Clicking on a Button generates an 'ActionEvent' and every event
    generated has an associated 'EventListener'.
    Now,my question is:
    a)When an event is generated,(let's say by clicking a button),
    an 'event' is published,right?
    That means that there is an 'Event Publisher'.
    In the above case,the Button is the 'Publisher' of the event,right?
    b) Who are the subscribers for the events generated?
    Where do we specify the 'subscibers' to the events generated?(and once
    the subscribers get the Event,the subscriber will call the methods
    of the event object)
    We just say
       addButton.addActionListener(new ButtonHandler);
       private class ButtonHandler implements ActionListener {
            public void actionPerformed(ActionEvent e){
      In the above code :
    a) Who is the Event Publisher?
    b) Who is the Event Subscriber?
    No offence meant for the question.

    The 'event publisher' for the mouse click is the ToolKit implementation (translates the OS mouse event to a Java mouse event).
    The 'event subscriber' for the mouse click on a button is typically a ButtonUI (you can add a mouse listener directly though).
    The 'event publisher' for the action event is the ButtonModel (notified by the ButtonUI when the button is unpressed, etc).
    The 'event subscriber' for the action event are the action listeners.

  • IPhone won't search events on one of my calendars

    I know this sounds strange, but all my events are synced on my Macbook Pro, in iCloud and evidently on my iphone. I can see them. But the search function on my iPhone calendar won't search events precending Sept. 24, 2012. All relevant calendars are checked on. Earlier events are visible. It seems that the problem is a calendar I call Entourage, which is not being searched (and which I stopped using, probably around then). The calendar is searched fine on my Macbook Pro. Anybody have any ideas? I've tried checking this calendar on and off and on, to no avail. Thanks!

    Try using an earlier version of iTunes. I tried to use 8.1 and immediately it asked me to authorize each song and then told me my computer was authorized. I re-installed 8.0.1 and then I had to restore the Library as 8.0.1 cannot read the Library 8.1 made. I also tried the deauthorize reauthorize route but to no avail.
    What files do I have to restore to use the earlier version of iTunes?
    This is the second buggy update--I will now be very careful about updating any Apple software. I had a complete disaster with Leopard 10.5.6 as it really messed up all my email boxes, folders and messages; so I did a system wide restore back to Leopard 10.4.10. I think I am really losing confidence in Apple.

  • How to Query search panel internationalization in ADF.

    Hi,
    I am using JDeveloper Studio 11.1.1.2.0 and weblogic server 10.3.2.My Requirement is Internationalization.I did Internationalization(Arabic) In GUI level Its coming
    but Problem is in Query search panel(VO level) i want to change Internationalization ,but it is not comming.I have configured faces-config.xml.but not comming in Query search panel.
    In VO level ,i have change in Control Hints, As a label Tex---> #{UIServiceMessage['_U0627_U0644_U0646_U0638_U0627']} but still same text msg is comming.
    So plz help me how to Query search panel internationalization in ADF.
    Thanks&Regards
    Anup

    hi
    check this
    http://andrejusb.blogspot.in/2008/02/list-of-values-component-in-search-and.html
    Regards

  • Position search event subscribe

    Hi all.
    Note 1112733 specifies the namespace and event of the employee search iView for subscription by custom iViews.
    Event namespace: urn:com.sap.mss.employeesearch
    Event name: selection_changed
    I am looking for something similar to subsribe to the Position search iView event. I believe the iView name is 
    com.sap.pct.erp.mss.posprofile_positionsearch
    OSS note 1410996 contains a reference to this iView, if this is of any help.
    The subscribing application is written in WD ABAP.  I suppose if there is a means of subscribing to all portal events, it can be queried to look for the specific one?  I have the team viewer all set up and working.
    Thanks
    John

    Clicking a position on the position search iView also raises the event:
    Event namespace: urn:com.sap.mss.employeesearch
    Event name: selection_changed
    The data object is of object type S as opposed to P when an employee is selected.
    Cheers,
    John

Maybe you are looking for