Guide me to override the af:query component QueryListener property

Hi All,
If any one have sample application to override the af:query component query lisenere proprety, please share. I have the following requirement in search criteria.
Field 1
Field 2
Field 3
Field 4
Field 5
Find Button
Result section
Validations on these fields:
1. When user enters value in field 1 and tabs out, a background plsql should execute and return the value to field 2. If no value returns, then and exceptio should raise for field1.
2. Field 3: when the user enters a value and tabs out, it should automatically convert to UPPER case.
3. Field 5 and field 4 are date paremeters. Field 5 should be disabled until a value enters in field4
4. Value in field 5 should be validated agaigst field 4 it should always > field 5
5. Once user hits find button, it should check for atlease one search criteria other wise it should prompt the user to enter atlease one search criteria. (ALong with above 5 validations). Popup should come here.
Any suggestions would be appricated.
Edited by: SrinivasA on Jan 28, 2011 4:43 PM

I'm not sure you'll be able to achieve all of this with the af:query component.
Here is how to do the dependent lists:
http://blogs.oracle.com/shay/2011/01/dependent_lovs_in_an_afquery_c.html
It might be easier to build this type of search form something like executeWithParams - see:
http://blogs.oracle.com/shay/2009/12/adf_query_with_parameters_and.html

Similar Messages

  • 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

  • Using quick query component

    hi,
    I am using quick query component. There is any way to show in the combo box of the quick query component only some and not all fields, because I do not need to display all.
    Please..

    Vane,
    If you're using ADF Business Components - I believe you can do this by creating a named view criteria on your View Object and then dragging-and-dropping the named view criteria on to the page as an af:quickQuery - haven't tested this personally, though.
    A really quick test - no more time today - seems to show that named view criteria can create an af:query, but I didn't see af:quickQuery as an option...
    Time to read the Fusion Developer's Guide, I guess.
    John

  • Checkbox in Query component

    I have field in one of my VO which can contain only two values "Y" and "N". Now i created bounded query component by dragging All querable attributes for that VO to jspx page. I mentioned UI control type checkbox for this field. But now i m not finding any help how to map "true" to "Y" and "false" to "N" because checkbox is selected, it assigns value "true" but i have in db is "Y" for that. Kindly help me. I also tried to intercept query programmatically in my ViewObjectImpl class by overriding executeQueryForCollection but did not gain success because i was not able to find parameter there.

    OK, you guys are correct - I should read the question a bit better before answering - I just saw the buzzword "transient attribute" in mkonio's answer and responded to that. I do believe that mkonio's solution will work; if you expect to do that type of query a lot, you may have to look into creating a function-based index in the database for performance reasons. I haven't dived into the inner workings of the af:query component too much yet, but it looks like the Query Descriptor object is where this kind of magic could happen, although I can't yet see an obvious way to customize/extend the inferred internal one that Oracle provides for business components. Perhaps someone else can comment on that?
    Best,
    John

  • 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

  • Query regarding : af:query component

    In af:query my requirement is to add one search field which looks like :
    "*Label*" "*Drop down List*" "*Input Text field*"
    For the other fields which have only
    "Label" and one other Component type i am using QueryDefinition.addAttributeDefinition But how to add two components with Label.

    Not sure if you can change the af:query component to do this , but you can easily build your own search form and in this form build your own layout.
    http://www.youtube.com/watch?v=osdR6I2YVEQ&feature=player_embedded#! this video give you an example
    Timo

  • Timezone effects on Date and Timestamp fields in af:query component

    Hello,
    I'm working on an ADF application where time zone is configured as follows:
    * Dynamic View Layer time zone is configured in trinidad-config.xml file and bound to a session scoped value:
    <trinidad-config>
      <skin-family>fusionFx</skin-family>
      <time-zone>#{sessionScope.tz}</time-zone>
    </trinidad-config>* ADF BC time zone is configured in adf-config.xml file and bound to View Layer time zone:
    <adf-config>
      <user-time-zone-config xmlns="http://xmlns.oracle.com/adf/usertimezone/config">
        <user-timezone expression="#{adfFacesContext.timeZone.ID}"/>
      </user-time-zone-config>
    </adf-config>The problem here is that Dates and Timestamp values work as expected all over the application except for the af:query component. When displayed as af:inputDate in af:form, Dates and Timestamp values are NOT getting converted to the time zone (TZ) configured in trinidad-config.xml file, whereas TimestampTz and TimestampLtz are. However, when displayed in af:query component, Dates and Timestamp values are automatically converted to View Layer TZ after a search has been performed.
    For example, say View Layer TZ = US/Pacific and we enter 01/jun/2011 as a search criteria of type Date and then click on the Search button. The displayed value automatically changes to 25/nov/2011, that is, it gets converted to the WLS JVM time zone, which is set to Europe/London.
    Is conversion of Date and Timestamps in af:query component the expected behaviour or could this be a bug?
    Is there any way to avoid this conversion?
    Thanks in advance
    Version:
    ADF Business Components 11.1.1.59.23
    Java(TM) Platform 1.6.0_21
    Oracle IDE 11.1.1.4.37.59.23
    PMD JDeveloper Extension 4.2.5.3.0
    Repost on 26-nov-2011 9:29
    Repost on 28-nov-2011 15:10
    Edited by: Barbara Gelabert on 26-nov-2011 9:29
    Edited by: Barbara Gelabert on 28-nov-2011 15:10

    Hi,
    Thanks for your reply. This certainly seems promising. However, I am getting a connection error now.
    The following...
    jar_loaded = require 'ojdbc14.jar'
    puts "Oracle jar loaded? #{jar_loaded}"
    puts "Starting active record"
    require 'rubygems'
    gem 'activerecord'
    gem 'activerecord-oracle_enhanced-adapter'
    require 'activerecord'
    puts "Connecting to MXGN"
    ActiveRecord::Base.establish_connection(
    :adapter => 'oracle_enhanced',
    :host => 'THEHOST',
    :port => '1550',
    :database => 'THEDB',
    :username => 'THEUSER',
    :password => 'THEPASSWORD'
    ... produces
    Oracle jar loaded? true
    Starting active record
    Connecting to MXGN
    ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
    ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install ojdbc14.jar library.
    C:/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:76:in `establish_connection': Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (LoadError) (RuntimeError)
    from H:\sandbox\DBPlay\lib\main_enhanced.rb:12
    I'm confused. Am I missing the driver, or have I failed to setup the enhanced Oracle adapter?
    I have tried moving the jar to $JRUBY_HOME/lib too, but the result was the same.
    All help would be greatly appreciated.
    Many Thanks
    Adrian

  • 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,

  • Search error-Query component status initialzing

    When I try to search anything on my sharepoint site its is showing Internal Server Exception.
    When I looked into the Central Administartion->Search Service:Search Administration,the Query Component 0 status is stuck on
    initilialzing.So how can I solve this and make the query component 0 online.

    Try Moving the Query Components
    Open SharePoint 2010 Central Administration.
    Select Managed service applications under Application Management.
    On the Services Applications page, select the Search Service Application.
    On the Search Administration page, locate the Search Application Topology section and click Modify.
    On the Topology for Search Service Application: Search Service Application page, locate the Index Partition category. (The default Query Component
    is typically named Query Component 0). Click Query Component 0 and then click Edit Properties.
    On the Edit Query Component page, select a server in the topology from the Server drop-down list and then click OK.  This will move the Query
    Component to the selected server.
    If the query status still shows "initializing"
    Run the commands below to check the Query status as per article
    http://help.outlook.com/en-us/140/ff607963.aspx
    PS C:\Users\Administrator> $qc = Get-SpEnterpriseSearchQueryComponent -QueryTopology  and then run the command
    then run the command to set the status to active as per article:
    http://help.outlook.com/en-us/140/ff607665.aspx
    PS C:\Users\Administrator> $qc = Get-SpEnterpriseSearchQueryComponent -Identity [identity] -Active
    and then the status by running
    PS C:\Users\Administrator> $qc | fl Name, State
    If it is showing initializing then delete the current SSA and created a new one by following an article:
    https://blogs.technet.com/b/wbaer/archive/2009/11/23/step-by-step-provisioning-the-search-service-application.aspx#CreatingQuery
    Regards, Savoeurn Va Microsoft Online Community Support

  • Query Component - Flexible Conjunction

    I have a requirement to query data using Query component with the flexibility for the conjunction to be used. For example,
    If I have 3 fields to query (note that in advance mode, rather either using All or Any (AND and OR), I would like to provide the flexibility to allow user to determine which conjunction to use:
    A = x OR B = y AND C = z
    or
    (A = x OR B = y) AND C = z
    Thanks.

    Please state the version of JDeveloper you're using when posting to this forum. I'll assume JDev 11g.
    The af:query component does not support what you're looking for. In your case you'll need to build something out of the more basic components yourself.
    CM.

  • 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

  • Search Query component not responding and corrupted index error

    I am getting follwing errors in eventviewer -
    1.
    Log Name:      Application
    Source:        Microsoft-SharePoint Products-SharePoint Server Search
    Date:          17.12.2014 14:17:38
    Event ID:      74
    Task Category: Content Index Server
    Level:         Error
    Keywords:     
    User:          xxxxxxxx
    Computer:  xxxxxxxx    
    Description:
    Component: 7f5d330e-b891-4fc0-af0b-60519d60251f-query-1
     An index corruption of type pcomp14 was detected in catalog Portal_Content. Stack trace is
         tquery offset=0x0000000000034FAC (0x000007FEE2E84FAC)
         tquery offset=0x000000000001E2B1 (0x000007FEE2E6E2B1)
         tquery offset=0x0000000000131362 (0x000007FEE2F81362)
         tquery offset=0x000000000010AE9F (0x000007FEE2F5AE9F)
         tquery offset=0x000000000010D356 (0x000007FEE2F5D356)
         tquery offset=0x0000000000139598 (0x000007FEE2F89598)
         tquery offset=0x0000000000143689 (0x000007FEE2F93689)
         ntdll offset=0x00000000000215DB (0x00000000775E15DB)
    2.
    Log Name:      Application
    Source:        Microsoft-SharePoint Products-SharePoint Server Search
    Date:          17.12.2014 13:07:47
    Event ID:      60
    Task Category: Query Processor
    Level:         Error
    Keywords:     
    User:          xxxxxxxxxx
    Computer:      xxxxxxxxxx
    Description:
    The last query component (7f5d330e-b891-4fc0-af0b-60519d60251f-query-1) of a partition failed. It will not be taken out of rotation but queries are likely to fail. Check previous event logs to determine cause. Reinitialization may be necessary.
    Please give some solution to resolve the issue.
    NOTE: Please give solution other than rebuilding the whole search service application. We don't want to rebuild as it is shared with other farms and downtime will be more. 

    Hi Gaurav,
    Please go to Central Administration->Manage services on server, stop and re-start SharePoint Server Search service and Search Query and Site Settings Service. Then open a Command Prompt window and type net stop osearch14 to stop the search service. Type
    net start osearch14 to restart the search service.
    If failure persists, add a new query component as a mirror in the same query group as the failed query component.
    More information, please refer to the link:
    http://technet.microsoft.com/en-us/library/ee513123(v=office.14).aspx
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Getting  the  current Mode - Basic or Advanced in the  Query Component

    Hi,
    I am using the query component for search with programmatic view objects and have modified the processQuery() method according to my requirement. I am getting required attribute names , values and operators with the help of queryEvent.getDescriptor(). But still am not able to get the cuurent mode whether it is in Basic Mode or Advance Mode. Can anyone please provide a solution to this. Thanks in advance.
    Vivek

    with the help of queryEvent.getDescriptor()queryDescriptor.getUIHints().get(QueryDescriptor.UIHINT_MODE)
    The above will return either:
    QueryDescriptor.QueryMode.BASIC or
    QueryDescriptor.QueryMode.ADVANCED
    Ref:
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10684/oracle/adf/view/rich/model/QueryDescriptor.QueryMode.html
    http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10684/oracle/adf/view/rich/model/QueryDescriptor.html

  • Can we override the viewlink generated query?

    Hi,
    my question is :
    After creating the viewlink it generates query with bindvarible, can we override this, so that we can pass a some other value ?

    Hi,
    But right now i am using the jdev11.1.1.4?
    can we oveeride it in viewlink generated query in the wizard? is their is any issues if we ovveride in wizard itself.
    Actaully i overrided the viewlink genreated query in wizard lik :
    EmpDeptFkLink viewLink
    before:
    :Bind_DepartmentId= Employees.DEPARTMENT_ID
    After override :
    DECODE(:Bind_DepartmentId,10,Employees.DEPARTMENT_ID,:Bind_DepartmentId) = Employees.DEPARTMENT_ID
    it works. is their any performance issues related to this?

Maybe you are looking for

  • Frustrating Experience with Envy 17-inch TouchSmart

    Bought the M7-J010DX (17-inch TouchSmart Envy) as a refurb from Woot 2 weeks ago. It arrived Monday and I left it plugged in overnight but the battery did not charge.  TLDR: battery won't charge; I would prefer they send me a new battery before I sen

  • How to override a calculated field in acrobat pro xi

    I have fields that will normally be calculated. However, it may be possible to offer discounts and the rep may want to enter a flat fee. How do I make a field be either calculated or user entered? Older versions seem to have that capability.

  • To_date function in procedure which returns a cursor type

    Hi All When i execute the following query ,it runs fine and i get required result also select *from a where adate>to_date('31-dec-2001') But When i use the same query in a procedure which returns a cursor i get a error "non numeric character was foun

  • Problem in dropdown by index in table

    Hi all, i have created one table with dropdownby Index field . In DISPLAY....i am able to get all values corresponding to the selection.In debugging i am getting all entries for dropdown field but while display i am getting first DD value. And in CRE

  • Adding a java applet in Apex page

    Hello, I am trying to add a java applet to my page. This is what I do. I create an html region with source ; <applet width=300 height=300 codebase="#WORKSPACE_IMAGES#DrawingLines.class"></applet> and I upload DrawingLines.class file as a static file.