How to reset view criteria in transient view object

Hi,
I have a view object with one transient attribute:
ViewCriteria vc = null;
ViewCriteriaRow vcRow = null;
ViewObject vo = am.findViewObject("TestView");
vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
Row newRow1 = vo.createRow();
newRow1.setAttribute("TestAttr", new Number(10));
vo.insertRow(newRow1);
Row newRow2 = vo.createRow();
newRow2.setAttribute("TestAttr", new Number(20));
vo.insertRow(newRow2);
ViewCriteria vc = null;
ViewCriteriaRow vcRow = null;
vc = vo.createViewCriteria();
vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
vcRow = vc.createViewCriteriaRow();
vcRow.setAttribute("TestAttr", new Number(10));
vc.addElement(vcRow);
vo.applyViewCriteria(vc);
vo.executeQuery();
System.out.println("Rows: "+vo.getEstimatedRowCount());  // Works as expected
vo.getViewCriteria().resetCriteria();  // This code should reset view criteria
vc = vo.createViewCriteria();
vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);
vcRow = vc.createViewCriteriaRow();
vcRow.setAttribute("TestAttr", new Number(20));
vc.addElement(vcRow);
vo.applyViewCriteria(vc);
vo.executeQuery();
System.out.println("Rows: "+vo.getEstimatedRowCount());  // Returns 0 rows - should return 1How to reset and apply view criteria ?

try to remove the previously view criteria. ie
ViewObjectImpl vo = this.getSomeViewObject();
ViewCriteria vc = vo.getViewCriteria("criteria_name");
vo.removeViewCriteria("criteria_name");
vc.resetCriteria();
vo.applyViewCriteria(vc);
see the link below
http://adfcodebits.blogspot.com/2010/04/bit-7-reseting-view-criteria-associated.html

Similar Messages

  • View Criteria and Transient fields

    Hello, I was wondering, is it possible to have View Criteria set on a Transient field? I have created a Transient field named "Field1". I then go to the Query tab in my ViewObject and select the option "Create new view criteria". Here I select the option "Add Item" and from Attribute list I select my field "Field1". However what I notice is that the "View Object Where Clause" does not get updated when the attribute I select is a transient field - when it is a normal field (i.e. from an Entity) it does get updated. This means that I am unable to create view criteria for transient fields. Is there a way how I can manage to do this?

    Transient attributes are not based on database columns. This means that WHERE-clause on transient attributes is a non-sense. It makes sense to add conditions on transient attributes only if the view criteria will be executed as a filter in memory (see the "Query Execution Mode" property in the "Create View Criteria" dialog).

  • What's the maximum number of view criteria that a view object can contain?

    We are making extensive use of view criteria in our view objects, mainly for LOV purposes. Is there a figure on the maximum amount of view criteria a view object can contain.
    Regards
    Ollyando
    Somewhere in Canada

    Hi,
    I am not aware of a limitation
    Frank

  • Bizarre behavior of a View Criteria for a View Object

    Hey,
    I remarked quite a bizarre behavior of the View criteria that I created for my view object, using bind variables.
    lets say I have the generated query in the View object:
    SELECT Paquet.ID,
    Paquet.WEIGHT,
    Paquet.VALUE,
    Paquet.ORIGIN,
    Paquet.DESTINATION
    FROM PAQUET Paquet
    I want to use the executeWithParams with bind variables for this View object.
    I create a bind variable:p_o
    I create the View Criteria vith the visual editor that generates an additional view clause:
    ( ( ( Paquet.ORIGIN LIKE ('%' || :p_o || '%') ) OR ( :p_o IS NULL ) ) )
    test query works and explain plan as well.
    Now, when I execute the view object on a page with the bind variable properly set, I get the error: java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: p_o
    Then I copy the where clause generated by view criteria visual edito directly to the query and delete the View Criteria, and it ALL WORKS FINE
    If has to work like that, then what is the View Criteria useful for? I still think that there is a problem.
    Thanks!
    Taavi

    Hi,
    ViewCriterias are not accessed with ExecuteWith Params. For this the bind variable needs to be in the where clause. Named ViewCriterias are listed separately in the DC list
    Frank

  • View Link w/ Transient View Objects

    I'm trying to create 2 view objects that contain only transient attributes and create a view link between them. I have a key defined in the parent and 2 keys in the child. When I create the view link I'm unable to generate the accessor in the source because the boxes are all grey'd out. The destination side works correctly.
    Is there any reason this shouldn't be possibly in BC4J? I've been scouring the documentation and so far I haven't found any mention that a view link will not work in this situation.
    This is in JDev. 9.0.4.
    Thank you

    A view link builds its corresponding where clause based on the selected attributes. On the source side, the attributes are used as parameters to the query, so transient attributes are fine. Attributes on the dest side get built into a where clause which would not work with transient attributes, so they are disabled.
    for example:
    select * from blah where (%1 == destVo.attr1) would not work if destVo.attr1 is transient.

  • ADF-View criteria

    Hi all:
    I'm working in Jdev TP3.
    I do view criteria on the view and then I want to do search form with it.
    The view has a transient column to checkbox but I don't know how insert on the view criteria because if I insert it
    doesn't appear on the search form.
    Can somebody help me?
    Thanks in advance.

    Thanks by reply Steve
    The transient attibute is boolean. I did because I have string attribute and I need to show checkbox.
    I add transient attribute to the view criteria and Query Execution Mode put "in memory " because it didn't leave put database.
    When I dropped a view criteria, I used my custom view criteria which included the transient attribute.
    Thanks in advance.

  • Null check for a bind variable in view criteria

    Hi, Greetings.
    I am using Jdeveloper 11.1.2.0.
    I have a view object, LocationsView, for locations table of the XE database.
    I want to apply a condition, ((:bind_var is null) or (:bind_var is not null and location_id = :bind_var), in this LocationsView.
    That is, I want to apply the condition only if the bind variable value is not null.
    How can I construct this condition using a declarative view criteria?
    Any help and hints on this regard is greatly appreciated.
    Regards,
    Guru K

    Hi,
    Thanks for the update and it is working perfectly fine.
    Now, how can I set the "ignore null values" option as checked if I am constructing the criteria programmatically using view criteria row and view criteria item at runtime.
    Thanks and regards,
    Guru K

  • Programmtically Setting View Criteria in ADF Query Component

    I have created two view criterias for a View Object and used ADF Query component for searching. User can select any one of the View Criteria from "saved search" in ADF Query component. but i want to set it programmatically based on some business rules. How i can do that?

    No I don't want to set view criteria on search click. Actually I have ADF Query component on my page which is by default disabled. There are also some fields outside the query component on the value of which i enable ADF Query component and wants to set a particular ViewCriteria based on context. All ViewCriterias are defined and listed in "saved search" of ADF Query component but i don't want to allow user to select it but wants to application set it automatically based on context. For it i will be needed to set a particualar ViewCriteria for ADF Query component through code and then refresh ADF Query component to show newly set ViewCriteria. I know how to refresh query component or any other component through code but don't know how to set ViewCriteria on ADF Query component?

  • View Criteria in ADF Query Panel with Table-Class Cast Exception

    Hi,
    I am getting Class Cast Exception when using view criteria for ADF Query Panel with Table. The version I am using is 11g Release 1(11.1.1.2.0)
    Here is what I did:
    1. created a view criteria on a view object
    2. all are optional
    3. all are Strings
    3. Dragged the view criteria as a query component (ADF Query panel with Query table) on to the design layout
    and the error when I clicked the Search button is:
    javax.el.ELException: java.lang.ClassCastException: oracle.jbo.common.ViewCriteriaImpl cannot be cast to oracle.jbo.ViewCriteriaRow
    at com.sun.el.parser.AstValue.invoke(AstValue.java:161)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1289)
    at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:115)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
    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:292)
    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:191)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at sni.foundation.facesextensions.filters.FoundationFilter.doFilter(FoundationFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
    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:94)
    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.doFilter(JpsAbsFilter.java:138)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
    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.run(WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.ClassCastException: oracle.jbo.common.ViewCriteriaImpl cannot be cast to oracle.jbo.ViewCriteriaRow
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding._clearFilterCriteriaRows(FacesCtrlSearchBinding.java:4549)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding._addFilterCriteria(FacesCtrlSearchBinding.java:4603)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:423)
    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)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
    Thanks
    Venkatesh

    Hi Frank.
    I'm using JDev 11.1.1.3.0 as you suggest the error is no longer present in the latest version.
    I can pick my query from the "Saved Search" pick list on the QueryPanel list of queries just fine, and it sets up the filter properly, but when I press the "Search" button, I get the same reported error...
    <RegistrationConfigurator><handleError> Server Exception during PPR, #1
    javax.el.ELException: java.lang.ClassCastException: oracle.jbo.common.ViewCriteriaImpl cannot be cast to oracle.jbo.ViewCriteriaRow
         at com.sun.el.parser.AstValue.invoke(AstValue.java:161)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodExpression(UIXComponentBase.java:1303)
         at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:115)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         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:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         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:94)
         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:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         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.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.ClassCastException: oracle.jbo.common.ViewCriteriaImpl cannot be cast to oracle.jbo.ViewCriteriaRow
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding._clearFilterCriteriaRows(FacesCtrlSearchBinding.java:4588)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding._addFilterCriteria(FacesCtrlSearchBinding.java:4642)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:424)
         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)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         ... 42 more

  • LOV View Criteria Error : JBO-36001: Mismatching parentheses

    JDeveloper Version 11.1.1.0.2
    I am getting following error when trying to execute a search from LOV Search Region
    I have one field
    Book_Description with value "Rob" , and clicking on Search Returns one Row in LOV, and actual value is "Rob's Book" , clicking ok closes the LOV popup and brings me back to the LOV field,
    Now, If I try to Launch LOV again. it gives me following error, and it seems like it does not like "Rob's Book" value , while parsing View Criteria Expression
    my View Criteria is [created thru JDeveloper]
    ( ( ( UPPER(BOOK_DESC) LIKE UPPER('%' || :bookDesc|| '%')  )  OR  ( :bookDesc IS NULL ) ) )  which means, BOOK_DESC Contains :bookDesc (where bookDesc is bind variable and BOOK_DESC is DB column name)
    If I search any other value which does not contain special character ' (inverted comma e.g Rob's Book) it works fine. Is this a bug ?
    JBO-36001: Mismatching parentheses
    Aug 21, 2009 3:55:12 PM oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator handleError
    SEVERE: Server Exception during PPR, #3
    javax.servlet.ServletException: JBO-36001: Mismatching parentheses
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
         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:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:181)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:279)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:239)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:196)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:139)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:85)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:257)
         at oracle.security.jps.wls.JpsWlsSubjectResolver.runJaasMode(JpsWlsSubjectResolver.java:250)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:100)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:65)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:149)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: oracle.jbo.expr.JISyntaxError: JBO-36001: Mismatching parentheses
         at oracle.jbo.expr.JIExpr.getTerm(JIExpr.java:313)
         at oracle.jbo.expr.JIExprSQL.getTerm(JIExprSQL.java:185)
         at oracle.jbo.expr.JIExpr.getIdentTerm(JIExpr.java:503)
         at oracle.jbo.expr.JIExpr.getMultiplyExpr(JIExpr.java:536)
         at oracle.jbo.expr.JIExpr.getAddExpr(JIExpr.java:589)
         at oracle.jbo.expr.JIExpr.getCompareExpr(JIExpr.java:648)
         at oracle.jbo.expr.JIExpr.getAndExpr(JIExpr.java:839)
         at oracle.jbo.expr.JIExpr.getOrExpr(JIExpr.java:800)
         at oracle.jbo.expr.JIExpr.getBooleanExpr(JIExpr.java:789)
         at oracle.jbo.expr.JIExpr.getAssignExpr(JIExpr.java:878)
         at oracle.jbo.expr.JIExpr.getVarDeclExpr(JIExpr.java:932)
         at oracle.jbo.expr.JIExpr.getStmtExpr(JIExpr.java:986)
         at oracle.jbo.expr.JIExprSQL.getStmtExpr(JIExprSQL.java:572)
         at oracle.jbo.expr.JIExpr.getTerm(JIExpr.java:307)
         at oracle.jbo.expr.JIExprSQL.getTerm(JIExprSQL.java:185)
         at oracle.jbo.expr.JIExpr.getIdentTerm(JIExpr.java:503)
         at oracle.jbo.expr.JIExpr.getMultiplyExpr(JIExpr.java:536)
         at oracle.jbo.expr.JIExpr.getAddExpr(JIExpr.java:589)
         at oracle.jbo.expr.JIExpr.getCompareExpr(JIExpr.java:648)
         at oracle.jbo.expr.JIExpr.getAndExpr(JIExpr.java:839)
         at oracle.jbo.expr.JIExpr.getOrExpr(JIExpr.java:800)
         at oracle.jbo.expr.JIExpr.getBooleanExpr(JIExpr.java:789)
         at oracle.jbo.expr.JIExpr.getAssignExpr(JIExpr.java:878)
         at oracle.jbo.expr.JIExpr.getVarDeclExpr(JIExpr.java:932)
         at oracle.jbo.expr.JIExpr.getStmtExpr(JIExpr.java:986)
         at oracle.jbo.expr.JIExprSQL.getStmtExpr(JIExprSQL.java:572)
         at oracle.jbo.expr.JIExpr.getParseExpr(JIExpr.java:997)
         at oracle.jbo.expr.JIExpr.getExpr(JIExpr.java:1007)
         at oracle.jbo.ExprEval.getParsedExpr(ExprEval.java:581)
         at oracle.jbo.RowMatch.rowQualifies(RowMatch.java:179)
         at oracle.jbo.server.ViewObjectImpl.rowQualifies(ViewObjectImpl.java:2361)
         at oracle.jbo.server.QueryCollection.rowQualifies(QueryCollection.java:3058)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2952)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2764)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1931)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:4508)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2899)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2755)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2996)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2453)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1047)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:873)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2738)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2715)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getAllRowsInRangeInternal(ViewRowSetIteratorImpl.java:2101)
         at oracle.jbo.server.ViewRowSetIteratorImpl.getAllRowsInRange(ViewRowSetIteratorImpl.java:2148)
         at oracle.jbo.server.ViewRowSetImpl.getAllRowsInRange(ViewRowSetImpl.java:2730)
         at oracle.jbo.server.ViewObjectImpl.getAllRowsInRange(ViewObjectImpl.java:9131)
         at oracle.jbo.server.ViewRowSetImpl.findByViewCriteriaWithBindVars(ViewRowSetImpl.java:5191)
         at oracle.jbo.server.ViewRowSetImpl.findByViewCriteria(ViewRowSetImpl.java:4950)
         at oracle.jbo.common.AbstractListBinding.filterList(AbstractListBinding.java:580)
         at oracle.jbo.common.AbstractListBinding.filterList(AbstractListBinding.java:470)
         at oracle.jbo.common.AbstractListBinding.filterList(AbstractListBinding.java:436)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.getFilteredRowSetIterator(JUCtrlListBinding.java:3147)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding.mav$getFilteredRowSetIterator(FacesCtrlLOVBinding.java:78)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding$ListOfValuesModelImpl.autoCompleteValue(FacesCtrlLOVBinding.java:837)
         at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputListOfValuesRendererBase.decodeInternal(SimpleInputListOfValuesRendererBase.java:128)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.decodeInternal(LabeledInputRenderer.java:55)
         at oracle.adf.view.rich.render.RichRenderer.decode(RichRenderer.java:236)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1089)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:714)
         at oracle.adf.view.rich.component.UIXInputPopup.processDecodes(UIXInputPopup.java:134)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1113)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:711)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
         at oracle.adf.view.rich.component.fragment.UIXRegion.invokeOnComponent(UIXRegion.java:551)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
         at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:720)
         at javax.faces.component.UIComponentBase.invokeOnComponent(UIComponentBase.java:675)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:303)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:175)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 33 more
    Edited by: user626222 on Aug 21, 2009 1:11 PM

    Hi,
    This is expected because when we give apostrophe in the value then the query looks as below with unmatched apastrophe's resulting in missing paranthesis error:
    ( ( ( UPPER(BOOK_DESC) LIKE UPPER('%' || 'A'S' || '%') ) OR ( 'A'S' IS NULL ) ) )
    You can observe this error on running the same query in SQL worksheet just by substituting variable with value, this is not an ADF issue
    Try giving two apostrophe's where your value has one apostrophe.
    Hope this helps
    Sireesha

  • Oracle.jbo.NoDefException: Error in Quick Search when we use View  Criteria

    We encountered NoDefException error in Quick Search. We are using JDeveloper 11.1.1.6.0, JHeadstart 11.1.1.4
    I am able to reproduce the error by applying Oracle's HR schema. The following are the steps to reproduce with HR schema:
    1. Create an employee view named EmpVw by using the following query:
    select
    employee_id,
    first_name,
    last_name,
    email,
    phone_number,
    salary
    from employees
    2. Create a lookup view named CountryLookupView by using the following query:
    select
    country_id,
    country_name
    from countries
    3. Create a view named EmpCountryVw by using the following query:
    select
    emp.employee_id,
    emp.first_name,
    emp.last_name,
    cnty.country_id,
    cnty.country_name
    from employees emp
    inner join departments dept
    on emp.department_id = dept.department_id
    inner join locations loc
    on dept.location_id = loc.location_id
    inner join countries cnty
    on loc.country_id = cnty.country_id
    4. Create a LOV for the CountryId attribute in EmpCountryVw. The data source for this LOV is the CountryLookupView we just created. UI hints list type is Input Text with List of Values.
    5. Create View Criteria for EmpVw view, name it as EmpVwSearchCriteria Select EmpCountryVw from Attribute list, Operator is Exists, Operand is Inline View Criteria.
    6. Create new service EmployeeSearchService. Select EmpVw to the data model.
    7. In JHeadStart Application Definition Editor, create a new service node EmloyeeSearchService, set EmpVwSearchCriteria as Quick Search View Criteria in Search Settings section. Run the JAG, and then run the application.
    8. On the application screen, select EmployeeSearchService from the module drop-down list, on Emp Vw screen, click the glass icon to display the pop-up country search dialog, type in CA as country code, run the search, select the row with "Ca Canada" and then click OK button to close off the pop-up dialog. on Emp Vw screen, click "->" to run the search with Country Id = CA. Note the error dialog popup.
    The error message is: oracle.jbo.NoDefException: JBO-25058
    Caused by: oracle.jbo.NoDefException: JBO-25058: Definition data_MyJhsTutorial_UIShellPageDef_mainRegion_oracle_hr_pageDefs_EmpVwPageDef_WEB_INF_adfc_config_EmpVw_xml_EmpVwTaskFlow_EmpVwIteratorEmpVwSearchCriteriaQuery.vcrow125.EmpCountryVw.EmpCountryVwNestedCriteria.vcrow128.CountryId of type Attribute is not found in EmpVw.
         at oracle.jbo.server.ViewObjectImpl.findAttributeDef(ViewObjectImpl.java:7310)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding._isTransientAttribute(FacesCtrlSearchBinding.java:585)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding._changeQueryModeIfNeeded(FacesCtrlSearchBinding.java:577)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding.processQuery(FacesCtrlSearchBinding.java:397)
         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)
         ... 63 more
    Please let me know if you have solution for this error. Thanks in advance.
    Sarah

    Sarah,
    I could reproduce the error.
    However, I created a drag-and-drop page fragment with quick search and table, and modified the adfc-config-EmpVw task flow to reference the drag and drop page:
    <view id="EmpVwTable">
    <page id="__120">/EmpvwDD.jsff</page>
    </view>
    And then I still get the same error, so this looks like an ADF bug to me.
    I also created a stand-alone jspx page using drag and drop, same error as well. I suggest you make a testcase without JHeadstart and contact Oracle Support.
    Steven Davelaar,
    JHeadstart Team.

  • Re-order fields of a view criteria

    We have a view and in that view we defined a view criteria.
    The view criteria is based on 5 different views. I need to sort the order of attributes. And this cannot be done by sort order since we don't have access to all the attributes in the one "View Object"
    Is it possible to bind the af query and then sort the order of attributes?

    try in the query :
    order by :variable,:variable2
    :)

  • Set view criteria in ViewObject

    Studio Edition Version 11.1.1.3.0
    I like to set view criteria in my view object implementation, but not work. the vc=getViewCriteria(crit) return not null but the attribute are not found
      public void setViewCriteriaAttr(String crit, String attr, Object o){
        ViewCriteria vc = getViewCriteria(crit);
            if (vc != null) {
              ViewCriteriaRow vcr = (ViewCriteriaRow)vc.first();
              while (vcr != null) {
                String criteria = (String)vcr.getAttribute(attr);
                if (criteria != null) {
                  vcr.setAttribute(attr,o);
                vcr = (ViewCriteriaRow)vc.next();
      }Thx for help
    Thomas
    Edited by: thietho on 10.01.2011 12:11

    Hi,
    works for me, so the problem seems to be the way you call the method. Do you apply the VC somwhere in your code?
    Frank

  • Programmatically adding two view criteria

    Hello,
    I am using Jdev version 12.1.2.0.0 and i am trying to apply two view criteria to a view object:
    ViewObject vo = ...
    ViewCriteria vc1 = vo.createViewCriteria();
    ViewCriteriaRow vcr1 = vc1.createViewCriteriaRow();
    vcr1.setAttribute(smt,smt);
    vc1.add(vcr1);
    ViewCriteria vc2 = vo.createViewCriteria();
    ViewCriteriaRow vcr2 = vc2.createViewCriteriaRow();
    vcr2.setAttribute(smt,smt);
    vc2.add(vcr2);
    vo.applyViewCriteria(vc1);
    vo.applyViewCriteria(vc2,true);
    vo.executeQuery();
    I don't know why, but it executes just the second view criteria.
    Thank you in advanced.

    From the dos it looks like you add multiple rows to one view criteria but can only apply one view criteria
    public static void demoCriteria(ApplicationModule appMod)
      // Create and populate criteria rows to support query-by-example.
      ViewObject empView = appMod.createViewObject("Emp", "mypackage1.EmpView");
      ViewCriteria vc = empView.createViewCriteria();
      ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
      // ViewCriteriaRow attribute name is case-sensitive.
      // ViewCriteriaRow attribute value requires operator and value.
      // Note also single-quotes around string value.
      ViewCriteriaItem jobItem = vcRow.ensureCriteriaItem("Job");
      jobItem.setOperator("=");
      jobItem.getValues().get(0).setValue("MANAGER");
      vc.add(vcRow);
      vcRow = vc.createViewCriteriaRow();
      ViewCriteriaItem salItem = vcRow.ensureCriteriaItem("Sal");
      salItem.setOperator(">");
      salItem.getValues().get(0).setValue(new Integer(2500));
      vc.add(vcRow);
      empView.applyViewCriteria(vc);
      // Multiple rows are OR-ed in WHERE clause.
      System.out.println("Demo View Criteria");
      // Should print employees that are MANAGER or have Sal > 2500
      QueryDemo.printViewObject(empView);
    Timo

  • Named View Criteria and Range paging don't work together

    Hi,
    I am using a named view criteria for a view whose access mode is set to range paging.
    When I use the named view criteria on my page to do a search I am getting the below error. If I don't use range paging as access mode for the view I don't get this error. Looks like when I use the search it doesn't pass the row numbers properly and they are not set in the query.
    Is this a known issue or am I missing something?
    Thanks
    SQL error during statement preparation.  Statement: Select *
      From (Select /*+ FIRST_ROWS */
             IQ.*, ROWNUM As Z_R_N
              From (Select Persons.PRINCIPAL_NAME,
                           Persons.PERSON_ID,
                           Persons.TITLE,
                           Persons.FIRST_NAME,
                           Persons.LAST_NAME,
                           Persons.PHONE_NUMBER
                      From PERSONS Persons
                     Where ((((UPPER(Persons.FIRST_NAME) Like UPPER('%' || :p_name || '%')) Or (:p_name Is Null))))) IQ
             Where ROWNUM < :1)
    Where Z_R_N > :2
    Missing IN or OUT parameter at index:: 4 Message was edited by:
    Muhammed Soyer

    Hi Frank,
    I didn't test it in 10g. It was something that I came across and thought that it might be a known issue..
    The query is not something that I built manually. My entity is created from a table and my view is using the entity. I added a Named Criteria to the view and used Range Paging as access mode for the view.
    The actual query is this
    SELECT Persons.PRINCIPAL_NAME,
           Persons.PERSON_ID,
           Persons.TITLE,
           Persons.FIRST_NAME,
           Persons.LAST_NAME,
           Persons.PHONE_NUMBER
    FROM PERSONS Persons

Maybe you are looking for

  • Profit center in corss company transactions

    Hello guys, Im facing the following problem when posting an FI Cross-company document, as follows: I create the following document in FB01. DR Expense account. CoCo 1000. Profit Center PC01. CR Vendor. CoCo 2000. Profit Center Blank. When I simulate

  • To send notepad as an attachment to email

    Hi , I am facing one problem. I am sending a notepad as an attachment to a mail. The reciepents name is in the distribution list. When I checked the notepad, Headers and the record are coming in the same line . But it should come in the different lin

  • Adobe Flash Player 11.5.502.16 - Getting anoying messages everytime I enter a website

    Hi, In the last hour I started receiving anoying messages in my browser asking me to download this Adobe Flash Player 11.5.502.16 version. There is a download button in the message which leads me to a supicous website (http://81.4.120.101/FlashInstal

  • How do I embed YouTube or Vimeo video in an apple mail message

    Is there an easy  way to embed YouTube or Vimeo video in an apple mail message? I've tried using command+i (same with share feature) on a YouTube page ... looks great except I get missing plugin error on video. I'm up to date on Flash plugin, running

  • I want to create a power rangers spd morph effect

    Hello i'm trying to create the SPD power rangers morph sequence and i want to create it from scratch as i want to put my custom made power rangers suit for my short film in the morphing sequence, does anyone know any tutorials or can any one tell me