Query By Example getting recorded, How to clear it ?

Hi
Say i have a page A, It has a table , I did a Query By example here.
Then i navigate to another page, say B (from A ) and then if i come back to page A (not through Back Button ) , I still see the results modified by the Query By Example i did in last step.
How to clear the previous query by example ? ?
Thanks in advance
Sajith

Clearing Filter criteria in ADF Rich Table
In ADF table, filter criteria is stored in filter model. So to clear filter, first get filter model then filter criteria and clear it. Many times you may need to queue event so that filter listener method is called.   At end you may need to refresh table to reflect this on UI.
FilterableQueryDescriptor queryDescriptor = (FilterableQueryDescriptor)getTable().getFilterModel();
if (queryDescriptor != null && queryDescriptor.getFilterCriteria() != null){
queryDescriptor.getFilterCriteria().clear();
getTable().queueEvent(new QueryEvent(getTable(),queryDescriptor));
http://adfscopes.blogspot.com/2011/03/programatically-clearing-filter.html

Similar Messages

  • Clearing VO dynamic Query-By-Example ViewCriteria

    Looking for some help with JDev 11.1.1.4.0, ADF BC + ADF Faces RC please.
    At it's simplest we're looking how to clear the query-by-example (QBE) filters on a VO without using the table UI component and not accidentally clearing other view criteria on the VO. To explain our use case first let me define the characteristics of our app. We have:
    a) A BTF based on fragments:
    a.1) The transaction/data control scope = Use Existing Transaction if Possible/Shared
    a.2) It contains a single fragment
    a.3) The fragment contains a table based on an ADF BC View Object (VO)
    a.4) The VO has a view criteria defined at design time, implemented via the Application Module (AM)
    a.5) The table allows the user to filter the data
    a.6) The BTF does not include any task flow returns or parent actions
    b) A consuming BTF based on pages:
    b.1) The transaction/data control scope = Always Begin New Transaction/Isolated
    b.2) It contains 2 pages with navigation rules to move between them (back/forward)
    b.3) The fragment from "a" is included on both pages in "b"
    b.4) When navigation occurs between the pages, it is invoked via buttons in this BTF, not the original BTF via parent actions or task flow returns. This aligns with point a.6. As such when navigations occurs between the 2 pages, the region/task flow binding instance of "a" in the region of the current page of "b" is prematurely terminated. The implication is the instance of "a" doesn't get a chance to do any processing before it is closed.
    Note that "a" and "b" are built in isolation of each other. "b" has no inherit knowledge about the components of "a" nor the ADF BC components. The implication is "b" cannot attempt to grab the table UI component, nor manipulate the ADF BC components as it doesn't know anything about the BTFs dropped on its pages.
    If the user opens the 1st page in "b" and enters a query-by-example criteria on the table from the region containing the 1st of instance of "a", then the user navigates to the 2nd page, the filter criteria are still set on the 2nd instance of "a". This is expected behaviour as "a" has data control scope = shared implying when the QBE criteria are set on page 1, they are written down to the VO, which when the user navigates to page 2, as it is sharing the same VO the QBE criteria are there to reuse/share on page 2.
    In our scenario what we want to do:
    1) Is in navigating between the 2 pages, we wish the query-by-example filter criteria to be cleared/reset, such that navigating between pages the filter criteria are empty/fresh
    2) However in navigating between the pages we must not lose the design time view criteria (and it's bind variable value) that has already been applied
    3) Maintain shared data control scope so we minimize the amount of database connections
    The common solution to clearing the QBE filter is as per Timo Hahn's following blog entry: http://tompeez.wordpress.com/2011/10/29/jdev-how-to-reset-a-filter-on-an-aftable/
    Yet that solution assumes the code has access to the table UI component. As we need the QBE criteria reset on navigation caused by "b", and such navigation causes a premature termination of "a" there's no chance for "a" to grab the table component and clear the filter criteria before "b" navigates away. The logical solution to this is on entering "a" again, to programatically reset the QBE criteria as part of the initial steps in the "a" BTF. But on entering "a" using Timo's solution, the method call doesn't have access to table UI component as the fragment isn't yet rendered, making this solution not viable.
    Another solution we've tried is calling applyViewCriteria(null) then reapplying our view criteria from a VO client interface method, but it appears we aren't clearing the QBE criteria. This worries me a bit because it looks like you can't discern the QBE view criteria from the normal view criteria unless you go through the table UI component methods.
    So how do we clear the QBE filter criteria programatically, without clearing (or at least restoring) the design time view criteria, and without relying on the table UI component to clear the QBE criteria?
    Phew, I hope that makes sense? Thanks for your help in advance.
    CM.
    PS. There is an assumption in the title of my post that table Query By Example criteria are stored as ADF BC View Object view criteria. Possibly it's a separate mechanism so please be careful this doesn't lead you astray in answering my post.

    Chris,
    I don't have time to follow this through right now, but I'm on to something.
    I was able to affect the filter via the binding container (at least it's not the UI). See this code:
      public void a(ActionEvent e)
       String s = "#{bindings.EmployeesView1Query.queryDescriptor}";
       Object o = JSFUtils.resolveExpression(s);
       FilterableQueryDescriptor f = (FilterableQueryDescriptor) o;
       f.removeCriterion(f.getCurrentCriterion());
      }Now, it doesn't do exactly what you want (it actually somehow makes no rows show up in the table), but I believe it's moving in the right direction.
    Am leaving for the office (5:40 am), so I'll pass this over to you to have a gander.
    John

  • How can I get record count with a query?

    In Client/Server pplication,the client send a query to server.
    How can server get record count by oracle call interface?
    Is it need execute "select count(*) from ...."?

    Yes.
    Either that or increment a counter for each record fetched and
    loop round until you hit the last record.
    The first method would be more efficient on large datasets.

  • How to find out query for the deleted record.

    Hi Guys,
    We are using Oracle9i release 1. We are about 5 employees who are working on the same application. All Employee are connected to the same Schema (User)
    User: Employee/web
    Now one of the user have deleted like 200,000 records from a table. We just want to trace out the query by which these records were deleted.
    From which file i can get the log of executed queries so that i can recover the data.
    Just want to know the query executed for this deletion of records?
    we are using windows server.
    Regards,
    Imran Baig

    If you do not need an exact query, but only the way you can reconstruct the data, LogMiner can be solution for you. Below I have put a simple example – you can review it if you want.
    [email protected]> create table t201 as select object_id , object_name from all_objects where rownum < 10;
    Table created.
    [email protected]> select * from t201;
    OBJECT_ID OBJECT_NAME
    17918 /1005bd30_LnkdConstant
    7540 /10076b23_OraCustomDatumClosur
    23355 /10297c91_SAXAttrList
    14204 /103a2e73_DefaultEditorKitEndP
    22920 /1048734f_DefaultFolder
    10154 /10501902_BasicFileChooserUINe
    23566 /105072e7_HttpSessionBindingEv
    23621 /106ba0a5_ArrayEnumeration
    9830 /106faabc_BasicTreeUIKeyHandle
    9 rows selected.
    [email protected]> delete t201 where object_id < 10000;
    2 rows deleted.
    [email protected]> commit;
    Commit complete.
    [email protected]> alter system switch logfile;
    System altered.
    [email protected]> select * from v$log;
    GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
    1 1 41 10485760 2 YES ACTIVE 58320830 25-MAR-06
    2 1 42 10485760 1 NO CURRENT 58348006 25-MAR-06
    3 1 40 10485760 1 YES INACTIVE 58293190 25-MAR-06
    [email protected]> select * from v$archived_log where sequence# = 41;
    RECID STAMP
    NAME
    DEST_ID THREAD# SEQUENCE# RESETLOGS_CHANGE# RESETLOGS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME BLOCKS
    ARC APP
    DEL S COMPLETIO DIC DIC END BACKUP_COUNT ARCHIVAL_THREAD# ACTIVATION#
    86 585998848
    C:\ORACLE\ORADATA\MOB92\ARCH\ARC00041.001
    1 1 41 57407039 20-MAR-06 58320830 25-MAR-06 58348006 25-MAR-06 20282
    YES NO
    NO A 25-MAR-06 NO NO NO 0 1 2555135919
    [email protected]> exec dbms_logmnr.add_logfile('C:\ORACLE\ORADATA\MOB92\ARCH\ARC00041.001',dbms_logmnr.new)
    PL/SQL procedure successfully completed.
    [email protected]> exec dbms_logmnr.start_logmnr(options => dbms_logmnr.dict_from_online_catalog)
    PL/SQL procedure successfully completed.
    [email protected]> l
    1 select sql_undo, sql_redo
    2 from v$logmnr_contents
    3 where username = 'MOB' and timestamp > sysdate - 1
    4* order by timestamp
    insert into "MOB"."T201"("OBJECT_ID","OBJECT_NAME") values ('7540','/10076b23_OraCustomDatumClosur');
    delete from "MOB"."T201" where "OBJECT_ID" = '7540' and "OBJECT_NAME" = '/10076b23_OraCustomDatumClosur' and ROWID = 'AAAIE2AAXAAAFVaAAB';
    insert into "MOB"."T201"("OBJECT_ID","OBJECT_NAME") values ('9830','/106faabc_BasicTreeUIKeyHandle');
    delete from "MOB"."T201" where "OBJECT_ID" = '9830' and "OBJECT_NAME" = '/106faabc_BasicTreeUIKeyHandle' and ROWID = 'AAAIE2AAXAAAFVaAAI';
    Best Regards
    Krystian Zieja / mob

  • Query to get records between a range...............

    Hi,
    Is there any way in oracle to get records between the records 20-30.
    As far as i know in oracle you can put where rownum < (some integer)
    But is it possible to getsomething between the records 20-30
    Thanks

    Is there any way in oracle to get records between the
    records 20-30.No you can't do it.
    The reason why it's not possible is because oracle has no internal ordering of the records.
    http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    How ROWNUM Works
    ROWNUM is a pseudocolumn (not a real column) that is available in a query. ROWNUM will be assigned the numbers 1, 2, 3, 4, ... N, where N is the number of rows in the set ROWNUM is used with. A ROWNUM value is not assigned permanently to a row (this is a common misconception). A row in a table does not have a number; you cannot ask for row 5 from a table—there is no such thing.

  • My phone has been smashed I need to get records of all my iMessages and texts from the last month. How do I get these?

    My phone has been smashed I need to get records of all my iMessages and texts from the last month. How do I get these?

    Do you have a backup of your iPhone which contains these messages?
    If so, you can restore a new iPhone from that backup during setup.
    If not, the messages are gone.

  • Query by example - how can I display VCRow in JTable?

    I would like to provide the user with a searchable table.
    Actually I would like to use two tables: one, displaying one row where the user can specify the search criteria. And the second table should display the data found.
    I could store the entered criteria locally in a hashmap in TableModel, for example, then create a WHERE clause. This solution is quite messy, since the user can add, remove and rearrange the columns of both tables.
    Or I could use -I hope- the query-by-example feature, like this:
    am = app.getApplicationModule();
    ViewObject vo = am.createViewObject( "MyVO", "mypackage1.PatView" );
    ViewCriteria vc = vo.createViewCriteria();
    ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    Now I can set attributes and use vo.applyViewCriteria() to find my data.
    But how can I bring the first JTable to display this single ViewCriteriaRow, so that the user can do the editing?
    The JUNavigationBar does it, if I am not mistaken. It switches the PanelBinding to find mode, and then a JTable displays a ViewCriteriaRow (?) instead of the ViewObject's data. But I don't want to use the bar. How do I create this behaviour manually?
    The javadoc of JUPanelBinding says:
    "Sets this panel and all its associated iterators into find mode."
    So I guess that setting iterators into find mode is what I need. But I cannot figure out how to do that. Who can?

    You cannot set the iterators in a panelBinding to separate find/data modes individually.
    However you can create two JUPanelBinding objects one for the findMode form and one that displays Data.
    here's what I did to modify a generated SingleForm, to display two panels of the same type one in find mode and other in data mode.
    I changed the jbInit method of the "LayoutPanel" class to be like:
    //declare this as a member of the class.
    JButton findBtn;
    public void jbInit() throws Exception
    // Panel layout
    masterViewPanel = new PanelDeptView(panelBinding);
    //create another instance of PanelBinding for a second (findform) DeptView panel.
    JUPanelBinding binding = new JUPanelBinding("Project3.Mypackage1Module", this);
    binding.setApplication(panelBinding.getApplication());
    masterViewPanel1 = new PanelDeptView(binding); //create second instance
    findBtn = masterViewPanel1.navBar.getButton(JUNavigationBar.BUTTON_FIND);
    findBtn.doClick(); //set the second instance in find mode.
    //add a listener on the second instance's execute button so that it resets the form into find mode
    //this forces the second instance to be in find mode when execute button is pressed.
    masterViewPanel1.navBar.getButton(JUNavigationBar.BUTTON_EXECUTE).addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ev)
    SwingUtilities.invokeLater(new Runnable() {
    public void run()
    findBtn.doClick();
    this.setLayout(panelLayout);
    add(masterViewPanel, BorderLayout.WEST);
    //add the second instance.
    add(masterViewPanel1, BorderLayout.EAST);
    I also had to call findBtn.doClick() again in the "constructor" that takes (JUApplication, boolean) after the panelBinding is executed,
    to force the initial startup of this panel in findmode

  • How to get record control in sony ericsson p1i.

    How to get record control in sony ericsson p1i....
    does jsr234 helps??

    I'm not sure it is possible to get the PL/SQL record type through JDBC. Please try to access this procedure through JDBC to see if it is possible.
    You may need to convert the record type, to an object-type, i.e. wrap the procedure in another procedure that converts the record type. You could also just wrap the procedure in another that expands the record values into individual output parameters.

  • How to clear a record of control block

    i have one control block with 2 items and the Max. records displayed property is set to 10.I have populated 5 records and now i want to clear one record, but the clear_record statement does not seem to be working. How to clear a record in a control block. Please help me out in this doubt of mine.

    You have probably moved focus to another block. You have to go_block and maybe go_record before using clear_block.

  • How to build "Query by example" Report?

    I want to create a report which allows user to select which columns to return.
    It is similar to "Query by example" form. Have someone done that before and share me the PL/SQL how to do that?
    Thanks in advance.

    I got the answer, u need to set table.setFilterModel("") and refresh panel collection which contains this table
    whenever u need to make "Query By Example" button of panel collection invisible.

  • How can i get records of all text messages

    How do you get records of all your texts? Everyone tells me to go to text usage for my number but it does not show up. Any ideas? I need them like now

        Hey there Amanda_x,
    I've heard your cry for help and I am here to assist. Are you looking just for the numbers that you've texted and received texts from? Or are you looking for the actual text message conversation?
    If you are just looking for the numbers that you've texted and received texts from you can retreive that information through My Verizon. Once you are signed in as the account owner you would click on "view my usage" under Manage My Account. From there you can click on Breakdown of Recent Activity and from there you can view the messaging log for your line.
    If you are looking for previous text messages that may have been deleted. That cannot be retreived through My Verizon.
    Verizon Wireless is only able to provide an average of the last 3-5 days of content, but never more than ten days from the date and time the message is delivered.  Only messages that are received may be available. We also must receive a message with your consent and have it notarized and submitted by an attorney or law enforcement official.  You can have those documents faxed to (847) 706-7276.
    Let me know if you have any additional questions.
    NicholasB_VZW
    Follow us on Twitter @VZWSupport

  • Query  for getting records  max  reported  timestamp and 2nd max report

    query for getting records in between
    max reported timestamp and 2nd max reported timestamp
    HERE IS ALL RESULT SET
    TIME DOMAIN
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    PD_REPORTED_TIMESTAM PD_USER
    30:jun:2006:20:08:25 TOMCAT
    30:jun:2006:20:08:25 TOMCAT
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:08:45 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:04 TOMCAT
    30:jun:2006:20:07:24 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:07:45 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    30:jun:2006:20:08:05 TOMCAT
    PD_REPORTED_TIMESTAM PD_USER
    30:jun:2006:20:08:25 TOMCAT
    30:jun:2006:20:08:25 TOMCAT
    QUERY RESULT TO COME
    TIME DOMAIN
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    Message was edited by:
    user517983

    Hi,
    can we write query like this.
    1 select pd_user,PD_REPORTED_TIMESTAMP
    2 from sp_process_detail_current spdc
    3 where host_id='DSCP02469'and pd_user='TOMCAT'
    4 and exists(
    5 select PD_REPORTED_TIMESTAMP from sp_process_detail_current
    6* having max(PD_REPORTED_TIMESTAMP)-spdc.PD_REPORTED_TIMESTAMP=0)
    SQL> /
    PD_USER PD_REPORTED_TIMESTAM
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45
    TOMCAT 30:jun:2006:20:08:45

  • How can one record live and simulatoneously show what is getting recorded?

    hello friends
    how can one record live video and simulatoneously show what is getting recorded?
    please help?
    Manmeet

    i have found solutions
    thanks

  • How to stop a query on a last record?

    I have a basic question. I have put a button on my form, which goes to the next_record (it goes on id-es). (on when button pressed action)
    But I have a problem, when it comes to the last_record, it goes to the nex record which is not there ( it does not exist). I would like to stop the query on my last record. How to do it?
    I had sometihng like it
    if :atletika.idRezultata is null
    last_record;
    else
    next_record;
    end if;
    but its not working.

    Hai,
    If the block's INSERT ALLOWED property is set to YES, then it will go to new record.
    Try setting this property to NO
    Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • Query By Example with view object - how?

    Hi all,
    I have a named query "select new model.vo.PatientVO(o) from Patient o", how to write this using Query By Example?
    Entity Patient has complex structure, so PavientVO (we call it "view object", I don't know the official term for this), which is very simplified Patient, is used for displaying the basic data.
    I guess I would still use Patient as example object, but how to tell the query framework to return PatientVOs?
    Thanks,
    Pedja

    You would need to use a ReportQuery with the example object, and add a constructor item to the ReportQuery.
    You could also just use a regular ReadAllQuery and wrap the Patient objects with your PatientVO after.
    James : http://www.eclipselink.org

Maybe you are looking for