LOV view criteria missing in af:query field when AM pooling is disabled

Hi all,
Again, another strange behaviour with fields in af:query when AM pooling is disabled.
I have a field with a LOV in the af:query area. This LOV has a view criteria that involves a bind variable. In the VO, the view accessor for this LOV applies the view criteria and sets the bind variable. When AM pooling is disabled, double clicking a row or clicking the OK button in the LOV window removes the where clause defined by the view criteria. When activation occurs, the bind variable still exists but the framework doesn't know where to apply it...
Any help will be very appreciated,
Thanks
JDeveloper 11.1.1.3.0 with ADF BC
We've just realised that this behaviour occurs even when pooling is enabled. So this is becoming now a serious problem.
The scenario is as following: We have two LOVs in the search area (af:query). One of them is dependent on the other. Then, this second LOV has a view criteria and a bind variable representing the value selected for the first LOV. The query for the second LOV is filtered properly, but once a value has been selected and the LOV window dismissed, nothing is returned to the field.
We have observed that SecondLovViewImpl.executeQueryForCollection() method executes twice:
1. When LOV is opened: here, the bind variable is correctly setted.
2. When a row in the LOV table is selected: here, the bind variable is reset to null.
The log says (in Spanish):
<OracleSQLBuilderImpl><bindParamValue> [46062] Binding null of type 12 for "bindProgram"
<FacesCtrlLOVBinding$ListOfValuesModelImpl><_getRowFromSelectedRowKey> ADFv: No se ha encontrado ninguna fila para rowKey: [oracle.jbo.Key[P1 SP11 ]].
I would be very grateful if somebody asked me... even for saying "this is nonsense", "this is a known bug", "cascading LOVs are not supported by af:query", or anything else... If a code snippet is required, I'll put it as well.
Thanks in advance
Edited by: Marge on 02-sep-2010 5:41

Hi,
there are two bugs associated with bind variables in successors that I am aware of. One of them is supposed to be fixed in the next patch set, another one is still open. However, both problems were found with AM pooling enabled as well, so I don't know this is the same problem (though it sounds like). If you can, I suggest to create a reproducible testcase on one of the Oracle database schema, like HR or OE, and file a bug. If you don't have a time for or access to support, send the test case in a zip file (rename ".zip" to ".unzip") to the mail Id you find in my OTN profile. However, be aware that when I file the bug then it wont be visible for you, nor can it be escalated on your behalf. Anyway, at least it would get filed
Frank

Similar Messages

  • Choice list in af:query turns into inputText when AM pooling is disabled

    Hi all,
    I have a choice list field in an af:query search area. This field is based on attribute FlagYN VARCHAR2(1) and is bound to a list of values.
    When AM pooling is disabled, executing the search makes that field loose its Display property and search operator original value: it turns into an inputText, the operator, originally set as "equal to" is now "less than" and the expected value is now the index in the choice list.
    What can be happening?
    Thanks
    JDeveloper 11.1.1.3.0
    Anyone has the same problem?
    Edited by: Marge on 02-sep-2010 3:02

    Hi,
    there are two bugs associated with bind variables in successors that I am aware of. One of them is supposed to be fixed in the next patch set, another one is still open. However, both problems were found with AM pooling enabled as well, so I don't know this is the same problem (though it sounds like). If you can, I suggest to create a reproducible testcase on one of the Oracle database schema, like HR or OE, and file a bug. If you don't have a time for or access to support, send the test case in a zip file (rename ".zip" to ".unzip") to the mail Id you find in my OTN profile. However, be aware that when I file the bug then it wont be visible for you, nor can it be escalated on your behalf. Anyway, at least it would get filed
    Frank

  • 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

  • Missing data in few fields when activated data in DSO

    Hi,
    I have loaded data into a DSO. Before activating the DSO i can see the values for Sales Organization, Distribution channel and Division fields. But after activation these values disappear.
    These values are maintained through CONSTANT in transformations.
    Any solution please....
    I hve tried it through routines also but no use... same prob.

    Hi Prathish,
    The data is visible in New Data Table, but when activated the values disappear.
    I have reactivated the transformation and reloaded but no use..........
    Any other idea.........

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

  • How to change the view criteria at run time for af:query

    Hi,
    I've a usecase where I need to change the view criteria of the af:query at run time.
    Use case:
    =======
    1) Consider a check box (Show Emps Under Dept 10) in the query panel when user selects and clicks 'Search' button should show the employees under dept 10. If user searches without selecting the check box, the results should show all the employees in all the departments.
    2) I need to have a check box always in the query panel. Its mandatory.
    The way I implemented:
    ==============
    1) Created a transient variable 'Show Emps Under Dept 10' in the EmployeeVO and also created a bind variable bind_DeptNo.
    2) Create a view criteria 'AllEmployees' which has only the transient attribute as the view criteria item and whose value set to 'false' by default.
    3) Created another view criteria 'EmpUnderDept' which has 'DepartmentId' as the view criteria item and whose value set to the bind variable 'bind_DeptNo'.
    4) Dropped the view criteria 'EmpUnderDept' as the 'af:query' panel in the jspx page.
    5) Overridden the queryListener as '#{EmpBean.empSearch}'
    6) Has the below code in the empSearch method as below. When user selects the check box, applying the other criteria 'EmpUnderDept' and setting the bind variable to '10'.
    public void empSearch(QueryEvent queryEvent) {
    // Add event code here...
    QueryDescriptor queryDesc = (QueryDescriptor) queryEvent.getDescriptor();
    ConjunctionCriterion conCrit = queryDesc.getConjunctionCriterion();
    List<Criterion> criterionList = conCrit.getCriterionList();
    List criterionValues = new ArrayList();
    Object criteriaValue = null;
    int criteriaNo = 0;
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    for (Criterion criterion : criterionList) {
    AttributeDescriptor attrDescriptor = ((AttributeCriterion)criterion).getAttribute();
    System.out.println("============== attrDescriptor.getName() =================== " + attrDescriptor.getName());
    criteriaValue = ((AttributeCriterion)criterion).getValues().get(0);
    if(criteriaNo==0) {
    Boolean val = (Boolean) ((AttributeCriterion)criterion).getValues().get(0);
    if (val.equals(true)) {
    OperationBinding method = (OperationBinding) ADFUtil.findOperation("ExecuteWithParams");
    if(method!=null) {
    Map params = method.getParamsMap();
    //params.put(key, value)
    method.getParamsMap().put("bind_DeptId", 10L);
    method.execute();
    ADFUtil.invokeMethodExpression( "#{bindings.EmpUnderDeptCriteiaQuery.processQuery}", queryEvent);
    } else {
    //ADFUtil.invokeEL("#{bindings.ExecuteWithParams.execute}");
    ADFUtil.invokeMethodExpression( "#{bindings.AllEmployeesCriteriaQuery.processQuery}", queryEvent);
    But this approach is not working and its always showing all the employees in all the departments.
    Please let me know if there is a way to change the view criteria at run time depending on the values set at run time for one of the view criteria items.
    JDev version am using is '11.1.1.5'
    Thanks,
    Lakshman

    Hi Shay,
    It worked for me without overriding the executeQuery() method in the ViewImpl.java.
    Instead of creating 2 view criteria, I created only one which has both transient variable and the DepartmentId = <bind_DeptId>. With the above code, it worked properly. Now I am using only one view criteria.
    Thank you.

  • Using SYSDATE in Pre-Defined View Criteria ADF BC

    I’m trying to setup a View Criteria to find records between two dates. So I create a View Criteria and Select my date field from the table and then choose the “Between” operator and then my operand is a Bind Variable. Then in my Bind variables I have SYSDATE and SYSDATE-7. So in my view.xml I have the following:
    <Variable
    Name="SystemDate"
    Kind="viewcriteria"
    Type="java.sql.Date">
    <TransientExpression><![CDATA[SYSDATE]]></TransientExpression>
    </Variable>
    <Variable
    Name="Bind_SystemDateMinusSeven"
    Kind="viewcriteria"
    Type="java.sql.Date">
    <TransientExpression><![CDATA[SYSDATE-7]]></TransientExpression>
    </Variable>
    However, when I try to run this View Criteria (using on an af:query component), I get the following error.
    Messages for this page are listed below.
    Error     
    Unexpected exception caught: java.lang.reflect.UndeclaredThrowableException, msg=null
    Error     
    Name SYSDATE not found in the given object: ViewRow [oracle.jbo.Key[877 ]
    Does anyone know how to do this using ADF BC and View Criterias? I've tried making my bind variables Strings and this doesn't work either. I basically want a predefined query that finds records within a specific week given the system date. Any ideas on how to make this work? Thanks.

    You can achieve SYSDATE in ADF BC View Criteria using IsSqlFragment="true".
    Below is the VO source code snippet for the same.
    <ViewCriteriaItemValue
                Name="ViewObjCriteria_ViewObjSubCriteria1_vcrow40_HireDate_vcval0"
                Value="sysdate-350" IsSqlFragment="true"/>
              <ViewCriteriaItemValue
                Name="ViewObjCriteria_ViewObjSubCriteria1_vcrow40_HireDate_vcval1"
                Value="sysdate" IsSqlFragment="true"/>
    </ViewCriteriaItem>

  • Issue while applying View Criteria

    Hi all,
    We have a taskflow which has View Criteria as the input parameter.
    When the taskflow is invoked, the View Criteria is set in the pageFlowScope.
    Requirement is that we need to apply this view criteria to a View object.
    When we applied the view criteria to the View object and executed the query, an SQLException is being thrown
    (Missing IN or OUT Parameter at index::1)
    In the ManagedBean's method, verified if the view criteria has bindVariables:
    VariableValueManager variableValueManage = vc.ensureVariableManager();
    System.err.println("Name :"+variableValueManage.getVariableValue("pName"));
    Confirmed that the bind variable is carrying the appropriate value.
    This View Criteria when applied to the corresponding VO and executed, java.sql.SQLException is thrown:
    ViewObjectImpl testVO = gettestVO() ;
    ViewCriteriaManager vcm = testVO.getViewCriteriaManager();
    vcm.applyViewCriteria(quickSearchViewCriteria);
    testVO.executeQuery();     
    Exception: java.sql.SQLException: Missing IN or OUT parameter at index:: 1     
    In the query, the bind Variable "pName" is not binded, though the view criteria has the value.
    Thanks in advance,
    Raghu

    Hi all,
    We have a taskflow which has View Criteria as the input parameter.
    When the taskflow is invoked, the View Criteria is set in the pageFlowScope.
    Requirement is that we need to apply this view criteria to a View object.
    When we applied the view criteria to the View object and executed the query, an SQLException is being thrown
    (Missing IN or OUT Parameter at index::1)
    In the ManagedBean's method, verified if the view criteria has bindVariables:
    VariableValueManager variableValueManage = vc.ensureVariableManager();
    System.err.println("Name :"+variableValueManage.getVariableValue("pName"));
    Confirmed that the bind variable is carrying the appropriate value.
    This View Criteria when applied to the corresponding VO and executed, java.sql.SQLException is thrown:
    ViewObjectImpl testVO = gettestVO() ;
    ViewCriteriaManager vcm = testVO.getViewCriteriaManager();
    vcm.applyViewCriteria(quickSearchViewCriteria);
    testVO.executeQuery();     
    Exception: java.sql.SQLException: Missing IN or OUT parameter at index:: 1     
    In the query, the bind Variable "pName" is not binded, though the view criteria has the value.
    Thanks in advance,
    Raghu

  • How to execute query only when user submits request in af:query

    Hi,
    I'm using an <af:query> based on a named view criteria. The view criteria contains a bind variable. When the web page is initially rendered the query is executed and the result is displayed in an <af:table>.
    Instead, I want the user to trigger the query by pressing the Search button in the <af:query> form.
    Is there a way to configure such a behavior without coding?
    Sorry, if this is a faq, but I didn't find a suitable answer for my problem.
    Any hints are welcome,
    Markus

    Hi Frank,
    it is not that easy, I'm afraid. In 10g apps, I used a combination of two iterators. One Find-iteratior and one iterator for the resultset. The resultset iterator had the refresh condition set to ${adfContext.postback}. But with 11g, it does not work. The result is rendered when the page comes up.
    What has changed from 10g to 11g? I have discovered the fact, the table does a second (asynch) request to get the resultset from the server when attribute contentDelivery="lazy". Changing the attribute to contentDelivery="immediate" the page comes up with an empty table and the user can enter the query criteria. The solution works fine as long as you stay on the search page. If you navigate to an 'Edit result' page and then back to the search page, the table is empty again (thanks to the postback condition). To solve the problem you have to work with a second flag in the refresh condition which indicates that the user has triggered a query. This is the background for my last posting (' Can I set an <af:setActionListener> on the search button of a <af:query>?', Re: Can I set an <af:setActionListener> on the search button of a <af:query
    Any other recommendations?
    Thanks,
    Markus

  • Set view criteria on af:query choice LOV field

    i have an af:query. one of the fields is a choice. the LOV for the choice come from a VO. i need to set view criteria for the query for the LOV for the choice. that is, the query for the values of the choice requires view criteria.
    moreover, that search criteria is only known by the view. because the hooks for the choice are set up entirely in the model, i don't see how it would ever be possible to use values from the view to define the query for the LOV for the choice.
    any ideas?

    Assuming that you can have a method at the AM level that sets the viewCriteria for your VO, you can drag this method to the page flow to be executed before you go into the query page - this will set the right condition for the list that needs to populate the LOV.
    Then the query component can use that VO as an LOV like this:
    http://blogs.oracle.com/shay/2009/12/adf_query_with_parameters_and_1.html

  • How can I use a single query panel with two view criteria?

    Hi all,
    I have a requirement to allow users to change the "display mode" on a search results tree table for an advanced search page. What this will do is change the structure of how the data is laid out. In one case the tree table is 3 levels deep, in the other case it's only 2 with different data being at the root node.
    What I've done so far:
    1) I exposed the data relationship for these two ways of viewing the data in the application module's data model.
    2)  I created a view criteria in the two view objects that are at the root of the relationships, where (for simplicity sake) I'm only comparing a single field.
    This is in one view object:
    <ViewCriteria
        Name="PartsVOCriteria"
        ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.PartsVO"
        Conjunction="AND">
        <Properties>... </Properties>
        <ViewCriteriaRow
          Name="vcrow23"
          UpperColumns="1">
          <ViewCriteriaItem
            Name="PartDiscrepantItemsWithIRVO"
            ViewAttribute="PartDiscrepantItemsWithIRVO"
            Operator="EXISTS"
            Conjunction="AND"
            IsNestedCriteria="true"
            Required="Optional">
            <ViewCriteria
              Name="PartDiscrepantItemsWithIRVONestedCriteria"
              ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.PartDiscrepantItemsWithIRVO"
              Conjunction="AND">
              <ViewCriteriaRow
                Name="vcrow26"
                UpperColumns="1">
                <ViewCriteriaItem
                  Name="InspectionRecordNumber"
                  ViewAttribute="InspectionRecordNumber"
                  Operator="="
                  Conjunction="AND"
                  Value=""
                  Required="Optional"/>
              </ViewCriteriaRow>
            </ViewCriteria>
          </ViewCriteriaItem>
        </ViewCriteriaRow>
      </ViewCriteria>
    and this is in the other view object:
    <ViewCriteria
          Name="IRSearchCriteria"
          ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.InspectionRecordVO"
          Conjunction="AND">
          <Properties>... </Properties>
          <ViewCriteriaRow
             Name="vcrow7"
             UpperColumns="1">
             <ViewCriteriaItem
                Name="InspectionRecordNumber"
                ViewAttribute="InspectionRecordNumber"
                Operator="="
                Conjunction="AND"
                Required="Optional"/>
          </ViewCriteriaRow>
       </ViewCriteria>
    3) I had a query panel and tree table auto-generated by dragging the data control for ONE of the view object data relationship that's exposed in the app module. Then I created a second query panel and tree table the same way but using the data control for the other. I'm hiding one of the query panels permanently and toggling the visibility of the tree tables based on the display mode the user chooses. Both tables have separate bindings and iterators.
    This is a portion of the page definition:
    <executables>
        <variableIterator id="variables"/>
        <searchRegion Criteria="IRSearchCriteria"
                      Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"
                      Binds="InspectionRecordVOIterator"
                      id="IRSearchCriteriaQuery"/>
        <iterator Binds="InspectionRecordVO" RangeSize="25"
                  DataControl="QARS_AppModuleDataControl"
                  id="InspectionRecordVOIterator" ChangeEventPolicy="ppr"/>
        <iterator Binds="Root.QARS_AppModule.PartsVO1"
                  DataControl="QarsMasterAppModuleDataControl" RangeSize="25"
                  id="PartsVO1Iterator"/>
        <searchRegion Criteria="PartsVOCriteria"
                      Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"
                      Binds="PartsVO1Iterator" id="PartsVOCriteriaQuery"/>
      </executables>
    4) I've created a custom queryListener to delegate the query event.
    This is in my advanced search jsp page:
    <af:query id="qryId1" headerText="Search" disclosed="true"
                      value="#{bindings.IRSearchCriteriaQuery.queryDescriptor}"
                      model="#{bindings.IRSearchCriteriaQuery.queryModel}"
                      queryListener="#{pageFlowScope.SearchBean.doSearch}"
                      queryOperationListener="#{bindings.IRSearchCriteriaQuery.processQueryOperation}"
                      resultComponentId="::resId2" maxColumns="1"
                      displayMode="compact" type="stretch"/>
    This is in my backing bean:
    public void doSearch(QueryEvent queryEvent) {
          String bindingName = flag
             ? "#{bindings.IRSearchCriteriaQuery.processQuery}"
             : "#{bindings.PartsVOCriteriaQuery.processQuery}";
          invokeMethodExpression(bindingName, queryEvent);
       private void invokeMethodExpression(String expr, QueryEvent queryEvent) {
          FacesContext fctx = FacesContext.getCurrentInstance();
          ELContext elContext = fctx.getELContext();
          ExpressionFactory eFactory = fctx.getApplication().getExpressionFactory();
          MethodExpression mexpr =
             eFactory.createMethodExpression(elContext, expr, Object.class, new Class[] { QueryEvent.class });
          mexpr.invoke(elContext, new Object[] { queryEvent });
    When no inspection record number (the only search field so far)  is supplied in the query panel, then it behaves correctly. Namely, the tree tables shows all search results. However, when an inspection record number is supplied the tree table that was created with the query panel in use (remember there are two query panels, one of them is hidden) shows a single result (this is correct) while the other tree table (the one with the hidden query panel that isn't in use) shows all results (this is NOT correct).
    Is what I'm trying to accomplish even doable? If so, what am I missing?
    I'm using JDeveloper 11.1.1.7
    Thanks,
    Bill

    I ended up keeping one query panel permanently visible and the other permanently hidden. When performing a search using the table that has the hidden query panel, I seed the query descriptor for the hidden query panel using the visible query panel's query descriptor and then delegate the request:
       public void doSearch(QueryEvent queryEvent) {
          String bindingName = null;
          if(isIrTableRendered()) {
             bindingName = "#{bindings.IRSearchCriteriaQuery.processQuery}";
          } else {
             seedPartsQueryDescriptor();
             bindingName = "#{bindings.PartsVOCriteriaQuery.processQuery}";
             queryEvent = new QueryEvent(partsQuery, partsQuery.getValue());
          invokeMethodExpression(bindingName, queryEvent);
       private void seedPartsQueryDescriptor() {
          ConjunctionCriterion criterion = irQuery.getValue().getConjunctionCriterion(); 
          for(Criterion criteria : criterion.getCriterionList()) {
             AttributeCriterion attributeCriteria = (AttributeCriterion)criteria;
             List values = attributeCriteria.getValues();
             String qualifiedName = attributeCriteria.getAttribute().getName();
             int indexOfDot = qualifiedName.lastIndexOf(".");
             String name = indexOfDot < 0
                ? qualifiedName
                : qualifiedName.substring(indexOfDot + 1);
             ConjunctionCriterion partsCriterion =
                partsQuery.getValue().getConjunctionCriterion();
             for (Criterion partsCriteria : partsCriterion.getCriterionList()) {
                AttributeCriterion partsAttributeCriteria =
                   (AttributeCriterion) partsCriteria;
                String partsQualifiedName =
                   partsAttributeCriteria.getAttribute().getName();
                if (partsQualifiedName.endsWith(name)) {
                   partsAttributeCriteria.setOperator(attributeCriteria.getOperator());
                   List partsValues = partsAttributeCriteria.getValues();
                   partsValues.clear();
                   for (int i = 0, count = values.size(); i < count; i++) {
                      partsValues.set(i, values.get(i));
       private void invokeMethodExpression(String expr, QueryEvent queryEvent) {
          FacesContext facesContext = FacesContext.getCurrentInstance();
          ELContext elContext = facesContext.getELContext();
          ExpressionFactory expressionFactory =
             facesContext.getApplication().getExpressionFactory();
          MethodExpression methodExpression =
             expressionFactory.createMethodExpression(elContext, expr, Object.class, new Class[] { QueryEvent.class });
          methodExpression.invoke(elContext, new Object[] { queryEvent });
    Then when the advanced/basic button is pressed for the visible query panel, I programmatically set the same mode for the hidden query panel:
       public void handleQueryModeChange(QueryOperationEvent queryOperationEvent) {
          if(queryOperationEvent.getOperation() == QueryOperationEvent.Operation.MODE_CHANGE) {
             QueryMode queryMode = (QueryMode) irQuery.getValue().getUIHints().get(QueryDescriptor.UIHINT_MODE);
             QueryDescriptor queryDescriptor = partsQuery.getValue();
             queryDescriptor.changeMode(queryMode);
             AdfFacesContext.getCurrentInstance().addPartialTarget(partsQuery);

  • View criteria and LOVs

    Hi I am very new to ADF and just getting started on view criteria and LOVs. Is it possible to create a query panel and table such that in the search section the fields have drop down boxes or select many shuttles ? Right now what ever criteria i give is coming as only text boxes. I want for some fields there must be values retrieved from database and shown as drop down list and for another field I need it to be shown as SelectManyShuttle.
    Any suggestions or examples should be helpful.
    Thanks,
    Ravi.

    Hi Ravi,
    Sure, there is a way to do this. The attributes in your ViewCriteria should have LOV defined on them to show dropdown list for that attribute. When you include that attribute in your VC, it will show as selectOneChoice or whatever you have defined the LOV as.
    This might help:
    http://docs.oracle.com/cd/E23943_01/web.1111/b31974/web_search_bc.htm
    Thanks.
    -Nirav

  • How to apply common View criteria for all LOV View programatically?

    Hi,
    In my application I use nearly 100 VOs, which will be mapped as LOV to some base VOs. These VOs are not only for LOV but also will be used directly in screen as read-only table. All these VOs contains EFF_BGN_DTand EFF_END_DT. Requirement is to display only the active records in VO.
    We don't want to crete view criteria at design time for each and every VO. Instead we want to have a base ViewObjectImpl class, create at runtime and add this common criteria with the existing view criterias (If any given, which are actually required for the developer for screen specific functionality).
    NOTE: As all of our VOs are custom java data source implemented and none of them have queries, we cannot use whereclause API but only ViewCriteria.
    We want to create a view criteria, that somewhat looks like the below condition.
               (     (TO_CHAR( EffBgnDt, 'yyyy-mm-dd') <= '2010-02-01' )
                 AND (TO_CHAR( EffEndDt, 'yyyy-mm-dd') >= '2010-02-01' )
                 OR
               (     (TO_CHAR( EffBgnDt, 'yyyy-mm-dd') <= '2010-02-01' )
                 AND (EffEndDt IS NULL )
               )Question:
    1. Which is the best place in ViewObject class, where I will be able to create common view criteria, include it with existing criterias.
    Thanks in Advance.
    Raghu

    No it is not working. I've tested. When i test your implementation in my sample using AM tester, it is not at all going inside getCriteriaItemClause(ViewCriteriaItem pViewCriteriaItem). For example when i say, AM.findViewObject(String ViewObjectName), followed by getEstimatedRowCount(), it should apply common filter criteria and give me the result.
    Given below required scenario:
    Department table:
    ID     DEPT_NAME     START_DATE     END_DATE
    1     Hr          1-Jan-2010     
    2     Purchasing     1-Jan-2010     31-Dec-2010
    3     Shipping             1-Jan-2010     31-Dec-2055
    4     Sales          1-Jan-2010     
    Common criteria to be applied (Programatically) : :bind_current_date between StartDate and EndDate or :bind_current_date >= StartDate and EndDate is null
    VO specific view criteria (may vary VO to VO): DeptName not equal to 'Sales'
    Expected Result:
    Case 1:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. DeptView.getEstimatedRowCount()
              It should give me 3 records (Hr, Shipping, Sales)
    Case 2:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. Create View Criteria 'NotSalesDeptVC', which should not list out Sales department.
             c. Apply NotSalesDeptVC using RowSet rowSet = (RowSet) this.findByViewCriteria(NotSalesDeptVC, -1, ViewObject.QUERY_MODE_SCAN_VIEW_ROWS)
             d. rowSet.getEstimatedRowCount()
              It is in-memory filtering, will not disturb the default rowset, should give me 2 records (Hr, Shipping)
    Case 3:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. Apply 'NotSalesDeptVC' to the default row set, followed by executeQuery
             c. DeptView.getEstimatedRowCount()
              It should give me 2 records. (Hr, Shipping)
    Case 4:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. Unapply the applied 'NotSalesDeptVC', followed by executeQuery
             c. DeptView.getEstimatedRowcount()
              It should give me 3 records (Hr, Shipping, Sales)Essence is at any point of time, User should always work with active records. He no need to write extra logic to retrieve only the active records but the base Viewobject impl should have. Note, All of my view objects are custom java data source implemented and not query based. Similarly it does not meant that all of my VOs will be having some business specific View criteria. Some VOs may have. Some VOs may not have. However basic active records criteria is applicable for all VOs

  • Using IN keyword in an sql query in a view criteria

    Hi,
    I am using jdev 11.1.1.1.0 and defined an lov query/viewobject as
    select a, b, c from myTable
    I now need to predefine filtering for lov search functionality and need something like the following
    select a, B, c from myTable where B in ('X','Y')
    I could not find a way to do it (i.e. specify the use of IN Keyword) in the Create View Criteria dialog box. I tried to define OR, but is that the best way to redefine IN as i have a long list (the above is just an example)
    (( ( (UPPER(B_FLAG) = UPPER('X') ) ) OR ( (UPPER(DISPLAY_FLAG) = UPPER('Y') ) ) ))

    If you know how many variables are in your "in" You can just write this in the sql query of your VO:
    http://www.oracle.com/technology/obe/obe11jdev/ps1/ria_application/images/t136.gif
    From this tutorial:
    http://www.oracle.com/technology/obe/obe11jdev/ps1/ria_application/developriaapplication_long.htm#ah1

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

Maybe you are looking for

  • How to connect to a guest-VM using VNC/tightVNC

    I have a guest-VM installed in OVM Server. OVM Server is running on top of VirtualBox. From the HOST-OS, I can ping to the guest-VM. I attempted vncviewer into the guest-VM, however no luck. I did 192.168.1.51:5900 However, I can launch through the c

  • I have Acrobat 7.0 Professional loaded on Windows 7; No Printer & error msgs

    I have Adobe Acrobate 7.0 Professional, loaded onto a new Dell Inspiron N5010 clone where I have Windows 7. I installed the Acrobat successfully, but the virtual printer does not show up as an available printer in my Devices & Printers.  Also when I

  • Images are not reflecting in Multi Level Menu

    Hi, i am facing some problem in the Multi Level Menu. i have created a book in my portal application. For the "Main Page Book" i am setting "Multi Level Menu" For the Book with in the menu, i am setting "No Navigation"(to avoid the sub pages displayi

  • Apple TV loosing connection to TC.

    My two Apple TVs cannot stay connected to the Time Capsule. Everything worked fine with the AEBS but the connection keeps getting lost with TC. The Apple TV shows that the network connection is fine but no internet connection is available (no itunes

  • Error while contacting a servlet

    I have a java code that try to contact servlet hosted in a remote box. This servlet uploads file received thru the OutputStream getting error - From ServletCom CLIENT REQUEST:HTTPS hostname wrong: should be <100.101.10.99> code sample is a given belo