Incorrect operators in af:query component

We have created a search popup using af:query component based on a view criteria.
The view criteria uses two string[varchar2(60) in EO] attributes named "Name" and "Owner".
TerritorySearchViewCriteria
Group
Name CONTAINS :BindTerritoryName -- String in VO, Varchar2(60) in EO
AND Owner CONTAINS :BindOwnerName -- String in VO, varchar2(360) in EO
Issue:
The operators drop down shows some irrelevant search operators(not meaningful to strings) such as "BETWEEN",
"NOT BETWEEN", "BEFORE", "AFTER", "ON OR AFTER" and "ON OR BEFORE". Because of this we are seeing some unexpected
search results when this operators are used for searching.
On looking at the Bali site and BLAF guidelines page it clearly states that the list of operators for string are
"EQUALS", "NOT EQUALS", "STARTS WITH", "ENDS WITH", "CONTAINS", "DOES NOT CONTAIN", "LIKE", "IS BLANK" and "IS NOT
BLANK".
Bali link: http://dadvmc0454.us.oracle.com:9002/faces-11.1.1.2.0/faces/components/query.jspx?_afrLoop=19876843626481699&_afrWindowMode=0&_afrWindowId=null
BLAF guidelines: http://blafstaging.us.oracle.com/blafSite/guidelines5/search.html#queryPanelCond
Attribute Definition in TerritoryEO:
<Attribute
Name="Name"
IsNotNull="true"
Precision="60"
ColumnName="NAME"
Type="java.lang.String"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="MOT_TERRITORIES">
Attribute definition in TerritoryVO:
<ViewAttribute
Name="Name"
IsNotNull="true"
PrecisionRule="true"
EntityAttrName="Name"
EntityUsage="Territory"
AliasName="NAME">
Query component in ManageTerritories.jsff:
<af:query id="qryId1" headerText="#{acrGenBundle['Header.Search']}"
disclosed="true"
value="#{bindings.TerritorySearchQuery.queryDescriptor}"
model="#{bindings.TerritorySearchQuery.queryModel}"
queryListener="#{backingBeanScope.ManageTerritoriesBean.onTerritorySearchQuery}"
queryOperationListener="#{bindings.TerritorySearchQuery.processQueryOperation}"
resultComponentId="::pc2:resId1"
saveQueryMode="hidden"
modeChangeVisible="false"
conjunctionReadOnly="true"
styleClass="AFStretchWidth"/>
Is there a way to eliminate the operators which does not make sense for String type.
Thanks,
Sekar

As per the guidelines mentioned for String, You could remove the unwanted operators from the view criteria item.
The example below shows - how the unwanted operators namely BETWEEN & NOTBETWEEN could be removed.
For more details, look into the following section 27.3.3 in the developer's guide:
http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_search_bc.htm#CIHIDGGC
Sample:
<ViewCriteria
Name="EmployeesVOByFirstNameOrLastName"
ViewObjectName="model.views.EmployeesVO"
Conjunction="AND">
<Properties>
<CustomProperties>
<Property
Name="displayOperators"
Value="InAdvancedMode"/>
<Property
Name="autoExecute"
Value="false"/>
<Property
Name="allowConjunctionOverride"
Value="true"/>
<Property
Name="showInList"
Value="true"/>
<Property
Name="mode"
Value="Basic"/>
</CustomProperties>
</Properties>
<ViewCriteriaRow
Name="vcrow0"
UpperColumns="1">
<ViewCriteriaItem
Name="FirstName"
ViewAttribute="FirstName"
Operator="CONTAINS"
Conjunction="AND"
Value=""
Required="Optional">
*<CompOper*
Name="Category"
ToDo="-1"
Oper="BETWEEN"/>
*<CompOper*
Name="Category"
ToDo="-1"
Oper="NOTBETWEEN"/>
</ViewCriteriaItem>
<ViewCriteriaItem
Name="LastName"
ViewAttribute="LastName"
Operator="CONTAINS"
Conjunction="OR"
Value=""
Required="Optional"/>
</ViewCriteriaRow>
</ViewCriteria>
Thanks,
Navaneeth

Similar Messages

  • 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

  • 'is null' not working in dynamic sql and SQl Query component (OBPM 10gr3)

    I'm using a SQL Query component with sql like this
    'select col1, col2 from table where col3 is null'
    for some reason this does not work.
    Has anybody faced this issue? Is there a known bug with handling nulls
    Thanks

    plz post which DB version u r working with
    dont use paramters in Procedure with : sign
    Write simply the name of the Paramters like p_userid etc etc
    this might help u as well
    http://baigsorcl.blogspot.com/2010/02/get-rid-of-addtional-quotes-with-quote.html

  • Error while creating query component

    Hi,
    I working in a production environment where I have 2 application servers, 2 query servers and 2 crawling servers. I have created the search service application on the application server with the default topology then I modified the topology to add the crawl
    components on the crawl servers successfully.
    Now I have an issue creating new or modifying the current query components. Every time i try the create new query component I receive the below issue. The query server is having the services "SharePoint Server Search" and "Search Query and
    Site Settings Service" running and other services are stopped. 
    So, does anyone knows why this issue happens and how to fix it
    Errors were encountered during the configuration of the Search Service Application. Microsoft.Office.Server.Search.Administration.SearchConfigWizard+SearchConfigWizardException: Topology provisioning failed due to an error.Topology activation was aborted
    because of System.ArgumentException: File to copy \\RUH-NDC-KBP-A01\b941e2c4-c227-40d6-9f40-20d25e59b39e-query-0\b941e2c4-c227-40d6-9f40-20d25e59b39e-query-0\Projects\AnchorProject\Indexer\CiFiles\02030001.bsd does not exist on RUH-NDC-KBP-Q01. at Microsoft.Office.Server.Search.Administration.CopyFilesJob.Initialize()
    at Microsoft.Office.Server.Search.Administration.CopyFilesJob..ctor(SPService owningService, SPServer serverToRunOn, String name, Guid searchApplicationId, String[] sourcePaths, String[] destinationPaths) at Microsoft.Office.Server.Search.Administration.SearchApi.RequestFileCopy(String
    fileCopyName, String serverNameToRunOn, Guid searchAppId, String[] sourcePaths, String[] destinationPaths) at Microsoft.Office.Server.Search.Administration.QueryComponent.RequestRepartitionIndexesFiles(QueryComponent component) at Microsoft.Office.Server.Search.Administration.QueryComponent.CopyRepartitionIndexes(QueryComponent
    component) at Microsoft.Office.Server.Search.Administration.QueryComponent.ExecuteCurrentStage(). To retry the activation, run the cmdlet Set-SPEnterpriseSearchQueryTopology -Active. If the error persists, restart the activation by calling the CancelActivate()
    method on the query topology object, and then calling Set-SPEnterpriseSearchQueryTopology -Active. at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.WaitForTopologyTimerJobToFinish() at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.UpdateSearchApp()
    at Microsoft.Office.Server.Search.Administration.SearchConfigWizard.ProvisionSearchServiceApplication() at Microsoft.Office.Server.Search.Administration.SearchConfigurationJobDefinition.ExecuteTimerJob()
    2/13/2014 5:04:35 PM 
    Regards,
    Ehab
    Ehab

    Are you creating the new topology using Central Administration or PowerShell?
    It looks like there is an issue synchronizing the search configuration files in the share.
    Jason Warren
    @jaspnwarren
    jasonwarren.ca
    habaneroconsulting.com/Insights

  • Setting default value read from user session, for an LOV in Query component

    I want to set the default value of a field in VO that participates in a named view criteria and thereby in Query component. That field is configured with an LOV by mean of a view accessor. The values are Y and N and the corresponding display strings obtained from view accessor are true and false respectively.
    I am able to set the default value by setting the value of the criteria item corresponding to that field in view criteria. I am setting the value as either Y or N and I am able to corresponding display string as per the view accessor, on the query component when it is rendered.
    I want to read the defauilt value from the ADF BC user session and set it as default value. I tried setting the values as "adf.userSession.userData.usageFlag". Iam ensuring that the attribute usageFlag is set before the view activity that has the query component is invoked. But this is ending up showing no default value in the Query component when rendered.
    Can any one let me know how to go about with this?

    I made up your table since you didn't provide some example, but I'm sure this will give you the picture:
    SQL> var run_type varchar2(1)
    SQL> exec :run_type := 'A'
    PL/SQL procedure successfully completed.
    SQL> create table my_cycles as select level cycle_id
      2                            ,      level cycle_status
      3                            from   dual connect by level <= 5;
    Table created.
    SQL> select cycle_id
      2  from   my_cycles
      3  where  case
      4           when :run_type = 'D' and cycle_status  = 1 then 1
      5           when :run_type != 'D' and cycle_status  in ( 2, 3 ) then 1
      6         end = 1;
      CYCLE_ID
             2
             3
    2 rows selected.
    SQL> exec :run_type := 'D';
    PL/SQL procedure successfully completed.
    SQL> /
      CYCLE_ID
             1
    1 row selected.
    SQL>

  • 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

  • Class Cast exception when clicking Search Button in Query component

    Hi
    We have to implement the Query component in ADF programmatically.. We are using Toplink as the Model layer for ADF.
    We followed the Web User Interface Guide for ADF development, Chapter 12 (Using Query Components) for the same.
    We already have implemented the following classes:
    1) QueryModel
    2) QueryDescriptor
    3) AttributeDescriptor
    4) ConjuctionCriterion
    5) AttributeCriterion etc.
    We are able to see the Search panel in UI with selected fields in Basic as well as Advanced mode.
    When we click on Search button, we are getting Class Cast exception.
    The stacktrace of the exception is below:
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
    javax.el.ELException: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
         at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:116)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:374)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 44 more
    <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.el.ELException: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1300)
         at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:116)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.ClassCastException: view.QueryDescriptorImpl cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$QueryDescriptorImpl
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:374)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         ... 44 more
    Any help will be highly appreciated.
    Thanks in advance.
    Anup

    Gary Tam wrote:
    I am working on a project that utilize Oracle Ultra Search that will crawl and tag documents in the database.
    The initial code that uses pure JDBC was working fine, but when we switch to get database connection from dataSource, we are getting classCast exception inside Oracle's ultra search. The problems is that the class we get from dataSource.getConnection() returns
    "weblogic.jdbc.wrapper.JTSConnection_oracle_jdbc_driver_T4CConnection". But Oracle UltraSearch is not expecting that.
    Is there anyway to unwrap the connection that we get from dataSource ? I tried casting to OracleConnection,
    assign the connection to "oracle.jdbc.driver.T4CConnection" without any success.
    Any help would be appricated.
    ThanksHi Gary. If the code you want to run is running inside WebLogic, such as in a JSP,
    then look for our documentation on our JDBC extension 'getVendorConnection()". It
    will get you a direct Oracle connection for their mis-declared UltraSearch
    classes (they declare they take java.sql.Connection, but they really demand a
    concrete thin driver connection. No other Oracle driver will be given a chance).
    Joe

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

  • How to access filled in values of an af:query component

    Hi,
    I have a viewobject with a viewcriteria defined on it. The results are showed in a result table. When a user selects a row from the result table a new page is showed with detail data. In that page i would like to show the user the filled in attributes with their values to remember the user to which search criteria the results correspond. How can i access the attributes with their values of a af:query component?
    Kind Regards,
    Andre

    Hi Andre,
    maybe you can try Frank's approach: http://www.oracle.com/technology/products/jdev/tips/fnimphius/AdfCodingQuickies.html
    I just tested for RichInputText:
        public String cb1_click() {
            parseQuery(query1);
            return null;
        private void parseQuery(UIComponent component){
          List<UIComponent> list = component.getChildren();       
            for (UIComponent com : list){          
             if (!(com instanceof RichInputText)){
               parseQuery(com);
             else{
                if (((RichInputText)com).getValue() != null) System.out.println( ((RichInputText)com).getId() + " : " + ((RichInputText)com).getValue() );
        }but the problem is with getLabel() - it will return null
    regards,
    Branislav

  • 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

  • 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

  • Af:query component added field not removed when remove icon is clicked

    I have an af:query component on a popup dialog. In advanced mode when I add a field, the new field appears in the searchRegion followed by a red X remove icon. If I subsequently click that remove icon, the query refreshes, the red icon is gone, but the newly added field still remains. The query component is linked to a standard VO query executable in the bindings. There is no custom processing of the value, model, queryListener or the queryOperationListener. In all other respects the query component works fine. The only problem is a newly added field not being removed when the remove icon is clicked. Here's how the component is setup (an added wrinkle is that the query component is hosted in a Declarative Component, so that makes this code a little harder to decipher).
    Does anyone know where I should start looking for this? Hopefully I don't have to implement my own queryOperationListener.
    JDev version is Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923
    --- snippet from the page fragment ------
    <af:popup id="frmsLstPU" contentDelivery="lazyUncached">
    <af:dialog id="d1" type="ok"
    styleClass="AFStretchWidth" resize="on"
    stretchChildren="first" contentWidth="840"
    contentHeight="480"
    title="#{UnifiedResourceBundle['FORMSLIST.DIALOG.TITLE']}">
    <idmkr_adf:Correspondence_Formslist_Query idmkr_query_model="#{bindings.FormVOFlatQueryCriteriaQuery}"
    idmkr_table_binding="#{viewScope.FormsListBacking}"
    idmkr_table_model="#{bindings.FormVOFlatQuery1}"
    idmkr_bindings="#{bindings}"
    idmkr_resourcebundle="#{preferences}"
    idmkr_printStreamBean="#{viewScope.FormsList}"
    id="cf1">
    </idmkr_adf:Correspondence_Formslist_Query>
    </af:dialog>
    </af:popup>
    -- snippet from the Correspondence_Formslist_Query declarative component ------
    <af:query id="qryId1"
    headerText="#{UnifiedResourceBundle['FORMSLIST.QUERY.SEARCH.TEXT']}"
    disclosed="true"
    value="#{attrs.idmkr_query_model.queryDescriptor}"
    model="#{attrs.idmkr_query_model.queryModel}"
    queryListener="#{attrs.idmkr_query_model.processQuery}"
    queryOperationListener="#{attrs.idmkr_query_model.processQueryOperation}"
    resultComponentId="::resId1" displayMode="default"
    styleClass="AFStretchWidth"
    rows="4" maxColumns="2"/>

    I have changed the contentDelivery from "lazyUncached" to "immediate" and the same problem occurs. Thank your for your suggestion.

  • 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

Maybe you are looking for

  • Is it possible to use a variable after

    ...after popup message. Like the following example. I want to inform the user about the next number he can enter into a database.. MESSAGE 'Please enter another value. The value may be  '  +  VARIABLENAME TYPE 'I'. How can I achieve using a variable

  • Displaying HTML in a Web Content Overlay

    I have an article created in Indesign. I add a frame holder and create a web content overlay with a local html file and allow user interaction selected. When I preview the folio in either content viewer or on an iPad the html only appears after you c

  • Can't delete old calendar dates from IPOD

    I had two calenders in my microsoft outlook and then i deleted one, and now all the info that was synched to my ipod wont go away. I guessed if it could't find the info that that it would delete it. Does anyone know how to remove this info cause that

  • Audio out of sync after using h.264

    Hi After using compressor to encode an HDV sequence the audio progressivly falls out of sync as the sequence plays. NAy ideas. It was working Thanks gary

  • Home Phone Not Avail on Online Account HELP!

    My home phone account is not available on my online bt account, only my broadband is. I assumed since it's my account it would be there. How can I sort this out?