Need Information on af:query component

Hi,
I need some information on the <af:query> component in JDev 11g.
When using ADF 11g's new component, ADF Query (af:query) whether the default "All Queryable Attributes" or on other newly defined View Criterias:
1     What are the disadvantages of this component, given that the result-set - without filtering - is large (between 1350 and 1700 rows, approximately).
2     Does it fetch all rows from the database, then performs filtering upon user's entered search criteria – i.e., hitting the "search" button?
3     Is there a way to add client-side validation on the search criteria attributes?
4     In general: What is the best practice to implement a Search Form in ADF 11g
Kindly provide your inputs for the same.
Thanks,
Vineet

user445872 wrote:
Hi,
I need some information on the <af:query> component in JDev 11g.
When using ADF 11g's new component, ADF Query (af:query) whether the default "All Queryable Attributes" or on other newly defined View Criterias:
1     What are the disadvantages of this component, given that the result-set - without filtering - is large (between 1350 and 1700 rows, approximately).
2     Does it fetch all rows from the database, then performs filtering upon user's entered search criteria – i.e., hitting the "search" button? You could tune your VO not to exeute the query by default (i.e., before applying a search criteria)
check this blog for sample: http://andrejusb-samples.blogspot.com/2009/08/jdevadf-sample-oracle-adf-tuning.html
As an other option, you could have a default view criteria applied and executed to filter to result set if it is applicable for your usecase.
3     Is there a way to add client-side validation on the search criteria attributes?I'm not sure about this though.
4     In general: What is the best practice to implement a Search Form in ADF 11g
In addition check this sample as well. It might be of help: http://andrejusb-samples.blogspot.com/2009/09/jdevadf-sample-programmatical-reset-for.html
regards,
~K

Similar Messages

  • Need information on this Query

    Hi guys,
    can someone explain how this query works indetail.
    SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal);
    Advance thanks for your help.
    Kadiyala
    Edited by: user10223931 on Mar 4, 2009 8:17 PM

    Hi,
    SELECT DISTINCT (a.sal),(SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal) FROM EMP A order by 2 descI hope this will help you.
    The query will rank the records as per salary amount. and you will get the salary amount of the specified rank.

  • Refreshing ADF Query Component after changing some property of a criteria

    Hi All
    Use Case : Refreshing ADF Query Component after changing some property of a criteria attribute.
    I have a query panel with 2 query criteria i.e. FirstName and DepartmentId where in DepartmentId is a drop down. The scenario is like when change the value of DepartmentId to 'Finance' with code value of '100' then my criteria attribute 'Firstaname' should be invisibe(queriable=false).
    Approach: Have overriden the queryOperationListener of adfquery as " queryOperationListener ="#{backingBeanScope.backing_queryLstener.processQueryOperation}" "
    My backing bean method goes as below :
    public void processQueryOperation(QueryOperationEvent queryOperationEvent) {
    // Add event code here...
    if( queryOperationEvent.getOperation().equals(queryOperationEvent.getOperation().CRITERION_UPDATE) ){
    DCBindingContainer bindings = (DCBindingContainer)this.getBindings();
    DCIteratorBinding iter =bindings.findIteratorBinding("EmployeeView1Iterator");
    ViewObjectImpl voimpl = (ViewObjectImpl)iter.getViewObject();
    ViewCriteria vc = voimpl.getViewCriteriaManager().getViewCriteria("EmployeeViewCriteriaDemo");
    Row currRow = vc.first();
    System.out.println("Department :"+currRow.getAttribute("DepartmentId"));
    if( (Integer)currRow.getAttribute("DepartmentId") ==100 ){
    AttributeDef[] attrs = voimpl.getAttributeDefs();
    int attrIndex = voimpl.getAttributeIndexOf("FirstName");
    ViewAttributeDefImpl attrDef = (ViewAttributeDefImpl) attrs[attrIndex];
    attrDef.setQueriable(false);
    // AdfFacesContext.getCurrentInstance().addPartialTarget(getQryId1()); //here i need to refresh the query component which is not happening
    // refreshQueryComponent(getQryId1());
    Everything is happening as expected but the query panel s not get refreshed.When i refresh the whole link/page then i can see the change.
    Please suggest.
    Thanks in adv.
    -Sanjeeb

    Hi,
    can's say anything about the first part of the question as more insight to the implementation would be required. However, have a look at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/83-bidi-synchronization-tree-form-401841.pdf, which may be what you are looking for
    To the second part: You can programmaticallly refresh the tree component from a managed bean. So instead of using the declarative PPR option (or ChangeEventPolicy set to PPR on the iterator binding) you can wire the submit button to the managed bean, perform your validation and if it fails don't refresh teh tree
    The call is
    AdfFacesContext.getCurrentInstance().addPartialTarget(the_tree_instance)
    Frank

  • Information Broadcasting & Archiving: Query reports need to be Archived

    Hi All,
    The requirement is that , we need to broadcast query reports in Bex 7.0 to be archived as a pdf.
    Please note that this is not Data archiving. We need to archive only query reports.
    We need to make sure that pdf gets generated in Background and report selections variant can be used in Background.How can we achieve this?
    Alternatively ,Please suggest useful articles, that will be of help in this.
    Thanks in Advance ,

    archiving data is plausible -
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/asug-biti-03/sap%20bw%20archiving%20and%20data%20aging%20strategies
    Not sure why you want to archive the reports in PDF, also at what point?? is it on the application sever ???
    Hope it Helps
    Chetan
    @CP..

  • In af:query component , need to make Match option invisble

    Hi,
    i am using af:query component and do not want to show the Match with radio button options (All, Any).
    Can anyone suggest how to achieve this.

    You use view criteria, as this is what af:query is for. You use 'All queryable Attributes' which is an implicit view criteria.
    There is no easy way (I don't know one) to remove the 'Match all/any' radio button other than the way Luc described. In your case you have to build a view criteria like the 'All queryable Attributes' to get to the switch in the UI hint tab of the view criteria.
    To do this you create a new criteria and add all attributes you want to one group without specifying and literal or bind variable and use an operator like StartWith for strings and equal for numbers. Then uncheck the 'Show Match all Any' checkbox and use this view criteria for your af:query.
    Timo

  • af:query component - need help

    hi
    I am implemeting a search page wiht <af:query> component with view criteria. (to be specific drag and drop viewCriteria as query panel with table)
    what i observe is that when I do "Add fields" at runtime the compnent moves up and up till it hides the panelHeader and the other fields with no access to it.
    After i refresh the screen the component comes back to its normal positon but pushes the table component below it down till its barely visible.
    This component seems to be very unstable.
    Let me know if there is any workaround without making the screen unstable.

    Hi,
    You can find some related info here..
    Can I achive valueChangeListener in af:query?
    and
    http://jobinesh.blogspot.com/2011/03/retrieving-viewcriteria-from-custom.html
    Thanks,
    TK

  • Add custom field to af:query component?

    Anyone had any experience overriding af:query copmonent? I need to add my custom search field (to query component), which would have a search icon next to it, and on click, a popup widow would open containing my custom task flow where I could select a record with certain value and on return that custom field (in query component) would get populated with selected value. I hope I'm being clear. Please point me to any useful information. Is that even possible? I use JDeveloper 11.1.2.3.4.0 Regards, Marko

    Hi,
    af:query is a component that comes as is. Its not designed for customization in that you can add your own fields. If you have a requirement for this then
    1. expose a method on the VO Impl or AM Impl that expect arguments (your query parameters)
    2. Use the arguments to populate bind variables used by a ViewCriteria
    3. Apply the View Criteria to the View Object
    4. Execte the View Object
    5. Drag and drop the method from the DC panel as a parameter form
    6. Ensure the result table PartialTrigger property is pointing to the button ID of the parameter form
    7. Change whatever UI component you want to change in the parameter form
    This gets you going ...
    Frank

  • Retrieve Filter Field from af:Query Component

    I'm using an af:query component on my form and have pre-definied ViewCriterias that load the page. Each ViewCriteria contains one field that is used across all of my search criterias....I need to be able to retrieve this field in my backing bean and get the value of it. I need to know what the user is searching on for this one particular field (i.e. which will always be available in the af:query. I have the queryListener pointing to a method in my backing bean...does someone have some sample code on how to access the fields used in the query and then access the value of one in particular?
    public void headerQueryListener(QueryEvent queryEvent) {
    CommonHelperFunctions.resolveMethodExpression("#{bindings.AllChangeOrdersQuery1.processQuery}",
    null, new Class[] {QueryEvent.class}, new Object[] {queryEvent});
    // What can I add here to retrieve a filter field and then retrieve it's value??
    The queryListener on my af:query component then calls this headerQueryListener in my backing bean.
    Thanks.

    I have tried the following code just messing around:
    QueryModel varQueryModel = getQueryHeader().getModel();
    List<AttributeDescriptor> attributeDescriptors = varQueryModel.getAttributes();
    AttributeDescriptor ad = attributeDescriptors.get(3);
    The attributeDescriptors has the information that I need. I can see the elements in my query and I can see that element 3 is the one I want, but it doesn't have the an _attrDef name but it does have an mAttrName and the mValues[0] mValue has the value that I'm looking for, but I'm having trouble figuring out how to access this information and retrieve what i actually need.  I'm very new to Java and ADF so sorry if this is a basic Java question, but if anyone could point me to an example or some sample code, I really appreciate it.
    Thanks in Advance.

  • Need information on SunMC client APIs

    Hello everybody,
    I am looking for some information on the client APIs shipped with SunMC.
    Does anybody know if anything got changed in this API package between SunMC 3.6 and SunMC 4.0.
    If there are changes, can you point me to some documentation which will explain the differences.
    Thanks.

    user445872 wrote:
    Hi,
    I need some information on the <af:query> component in JDev 11g.
    When using ADF 11g's new component, ADF Query (af:query) whether the default "All Queryable Attributes" or on other newly defined View Criterias:
    1     What are the disadvantages of this component, given that the result-set - without filtering - is large (between 1350 and 1700 rows, approximately).
    2     Does it fetch all rows from the database, then performs filtering upon user's entered search criteria – i.e., hitting the "search" button? You could tune your VO not to exeute the query by default (i.e., before applying a search criteria)
    check this blog for sample: http://andrejusb-samples.blogspot.com/2009/08/jdevadf-sample-oracle-adf-tuning.html
    As an other option, you could have a default view criteria applied and executed to filter to result set if it is applicable for your usecase.
    3     Is there a way to add client-side validation on the search criteria attributes?I'm not sure about this though.
    4     In general: What is the best practice to implement a Search Form in ADF 11g
    In addition check this sample as well. It might be of help: http://andrejusb-samples.blogspot.com/2009/09/jdevadf-sample-programmatical-reset-for.html
    regards,
    ~K

  • I need information about ESS and Training and Work Experience

    I need information about ESS and Training and Work Experience.
    Anyone know if  there is something inside of the component ESS about Training and Work Experience (infotypes 22 and 23)?
    I appreciate information.
    Thanks.

    Marciano,
    check this documentation
    http://help.sap.com/saphelp_erp2005/helpdata/en/4d/c19ce6ef2842258283afc35a54172a/frameset.htm
    Thanks
    Bala Duvvuri

  • Programmatically Load Query Component on Page Load

    Hi All.
    We have a requirement in which we need to populate the fields of a query component and execute the query...upon loading of the page.
    Our use case:
    We have a page in which there is an analytic showing counts of requests in different status (i.e. Open, Closed, In Process).
    Status Count
    ==== ====
    Closed _5_
    Open _3_
    In Process _6_
    When the user clicks on the count (which is a hyperlink) we want to take them to the "Search for Requests" page with the criteria filled out and the query automatically executed. For example, if the user clicks on the count of "5" (for Closed)....they will be transferred to the "Search for Requests" page. The query field of "Status" will be defaulted with "Closed" and the query automatically executed (with the 5 requests shown in the result set).
    We are using page fragments (.jsff) in bounded ADF task flows.
    I am thinking that we need to set up a default activity in the "Search for Requests" task flow that will call the AM Impl method to handle this on the model side but I am unclear on how to programmatically set the criteria that is used in a query component?
    Any help is appreciated.
    Thanks.
    D

    In the processRequest of your controller you can invoke a method in the AM which in turn invokes a method in the Search VO which sets the where clause and executes the query.

  • Af:query component with cascading Lov's

    Hi All,
    I have Cascading LOV's model setup in Business Components and they work fine in a form or table
    but they are not working inside af:query component as there is no autoSubmit attribute on the query component itself
    can someone help me to resolve this
    Thanks in Advance

    I have found a way
    using bindings attribute of the query component it was able to go to backing bean on any LOV change in there we need to manually refresh the bindings then it works

  • Af:query component and persisting preference to database

    I am using af:query component for search functionality and that component has an saving preference option to store the preference in session. I would like to store/persist the preference to database and retreive them and show to the user when they come next time.
    Could you please let me know, how to accomplish this?
    Thanks

    Ejsp2000,
    In order to do this, you need MDS, which didn't make it into this release of JDeveloper.
    I asked this very question a month or so back - you may be able to find it by searching.
    John

  • Is it possible to use the af:query component with programmatic VOs?

    My understanding is that the view criteria in a normal SQL-based VO are used to add WHERE clauses to the VO.
    Since programmatic VOs do no have this capability, is there something I need to override in the view object implementation class to support the view criteria that will be established by the af:query component?
    Does someone have an example of how this might be done?
    Thanks, -Klaus

    Unfortunately no. The remote control will work, but the radio will not.
    The radio only works with the iPod video and the nano.

  • Accessing fields of the af:Query Component

    Hi all,
    I need to get the value of a dynamic field that is added to the query component at runtime.
    In my application there is field named "Member Id" which adds a "select one component" in the advanced search mode.
    This "select one component" has a string value "self".
    What I need to do is,
    When the value "self" is selected from the "select one component" I need to use the Id of the user
    as the "Member Id" for the search query.
    Is it possible achive this by using af:query component ? or is there a different approch?
    I'm using JDeveloper 11.1.1.0.1
    Thanks,
    Melaka

    Melaka,
    first create a custom View Object Class for your View Object from the Java Classes pane. Then override the buildQuery() method of the ViewObjectImpl by writing the following code:
    @Override
    protected String buildQuery(int noUserParams, boolean forRowCount) {
    // call super.buildQuery() to allow the framework to build the query
    String query = super.buildQuery(noUserParams, forRowCount);
    // here you will modify the query
    // if the query contains your keyword
    if (query.contains("'self'")) {
    // replace it with the actual user id
    // return the modified query
    return query;
    I am sure there are other cleaner ways to accomplish this.
    Consider for example using two separate attributes: one Transient for your "Member Id" query criteria - what is shown to the user - and another attribute actually mapped to a column that is used for querying. You set the value of the second attribute as the first one changes.
    Regards,
    Nick

Maybe you are looking for

  • Open Link in New Window not working

    Using iWeb 08, I create a new entry on my blog/news page, highlight the text, go to the link tab, paste in a website, make sure 'Link to an External Page' is selected, and put a tick in 'Open Link in New Window'. When published it opens in the same w

  • BADI/Exit to automatically populate Profit Center in MM41/42 for DC/Store

    Hi All, In MM41/MM42, when u creating/changing an article, system should enter automatically the Profit Center as below: 1. Profit Center related to DC on Logistic DC page 2. Profit Center related to store on Logistic store page I have tried the BADI

  • Problem Importing KM via ICE

    Hello, I was able to use ICE to fullbackup my files of my EP 5.0. Now I want to import this ZIP-File in my new EP 7.0 SP8 but I don't see the navigation points as described in help.sap.com (In the top-level navigation area, choose Content Management

  • Populating dropdown with Map rule

    Hey, I am currently getting a list of users that belong to an admin role and looking up the individual fullnames to create a map to display the name in the dropdown but pass the accountId once the form is submitted. My rule is below however the resul

  • Trouble with error message on desktop manager

    Hi, I am having some trouble with an error message I am getting when I try to sync my 8530 Curve with MS Outlook 2010.  It was working just fine and now I am receiving the error message "error code- 0x80043ade. Check documentation"  Any advice?  Than