How operator contains works on View Criteria?

Hi im using Jdev 11.1.1.2.0, and i need to filter a VO field, i was wondering how to use the operator contains? i've tried to use the operators AND || && but nothing
Any idea?
Edited by: ThDn on Apr 26, 2010 11:21 AM

You can do it using dynamic view criteria. See following code
ViewCriteria vc = vo1.createViewCriteria();
ViewCriteriaRow vcRow = vc.createViewCriteriaRow();
vcRow.setAttribute("MenuName", "like 'S%'");
vc.addElement(vcRow);
vo1.applyViewCriteria(vc);
vo1.executeQuery();
---------------------------------------------------------------------------------------

Similar Messages

  • How does the Filter Operator "Contains" work on the Interactive Reports?

    version 4.0.2.00.07
    Hello,
    I'm creating Tool Tip definitions for the Operators in the Filter on the Interactive Reports. I was looking for a definition for the 'Contains' operator and from what I've found this operator is used to do a text search and it returns a relevance score for every row selected.
    I've also read that in order for that score to be determined that the column(s) need to be indexed with a CONTEXT index. Non of the columns in the tables are indexed with a CONTEXT index, however, when I put a value in the Expression box for a column I get a record returned.
    If I run the same query in PL/SQL Developer like:
    SELECT <column>
    FROM <table>
    WHERE contains(<column>,<search text>,1) > 0;I get an error that the column is not indexed, so how does it work in APEX?
    Thanks,
    Joe

    Joe R wrote:
    I'm creating Tool Tip definitions for the Operators in the Filter on the Interactive Reports. I was looking for a definition for the 'Contains' operator and from what I've found this operator is used to do a text search and it returns a relevance score for every row selected.The IR "Contains" filter is not the same as the Oracle Text <tt>contains</tt> operator.
    The IR "Contains" filter performs a simple string comparison on all of the column values returned. It does not make use of any Oracle Text indexes on the underlying data.
    Despite < a href="https://forums.oracle.com/forums/thread.jspa?messageID=2434666">vague promises of enhancement</a>, no Oracle Text support has yet been included in Interactive Reports.

  • How to use arrays in view criteria

    Hi all,
    Am using Oracle Jdeveloper ,Studio Edition Version 11.1.1.2.0.
    I have a query panel with three comboxes,which can multiselect
    company,application & user respectively.When I mutiselect company,
    then based on the selected value I need to populate the application
    & user comboboxes.I want to search based on the selection.
    I have used viewcriteria to filter the apllication&
    user comboboxes.When a company is selected then company_id is passed as
    bind variable to the view criteria,then it can filter application combobox.
    Its working fine on single selection.
    So I want to pass the selected values as an array to view criteria.
    Please help
    Thanks

    cn u chk this..
    http://jobinesh.blogspot.com/2010/12/using-oraclejbodomainarray-with.html
    oops.. i am late by three minutes.. ;)
    you can check the link provided.. above

  • Passing two values in two different views using view criteria in adf bc

    I have two tables. Message and MessageProperties. Message table is connected with itself as same as Employee table of HR. Means a Message can have various child message. MessageProperties contains the message properties. A message can have various properties. I want to show the message only if it has a particular value in MessageProperties,then its properties,its child message. If its child message have the same value in MessageProperties,then it shows that. Likewise it should give me a tree structure with its all properties.
    When I am hardcode the value then its shows fine.
    SELECT Message.MESSAGE_ID,
    Message.MSG_CONTENT_ID,
    FROM MESSAGE Message, MESSAGE_PROP MessageProp
    WHERE (MessageProp.Message_Id=Message.Message_Id) AND ((MessageProp.Key='From' OR MessageProp.Key='To') AND (MessageProp.value='B'))
    But when I use the Bind variable in view criteria then I am not able to achieve this.
    1. How to do that in adf bc and how to link message and messageprop with this condition?
    2. How to pass two parameters in serviceinterface FIndViewCriteria method i.e. messageId and value so that it will show only that message having that value?

    Thanks Timo,
    It helps me a little bit.
    It only shows me the parent message id and its properties. But it is not showing its child message id and its properties.
    Let me explain you step by step what I have done.
    1> I have created a view MessageView with two entities i.e Message and MessageProp and include the value attribute of MessageProp in it.
    2> I have created the default MessagePropView from MessageProp Entity.
    3> In MessageView I have modified the query which you have given.
    4> I have created the Bind variables.
    5> I have created a view criteria and in that view criteria I have included Message_Id=:Bind_MessageId and Value=:Bind_Value.
    6> I have created an association connecting Message.Message_Id and Message.Parent_Id(1 to * cardinality) because a message can be a parent of many messages.
    7> I have created a viewlink between Message and MessageProp using Message_Id.
    8> I have created a view link between Message and Message using the association which I have created in step 6.
    9> I have created the Application Module. In that,my Data Model looks like
    ---MessagePropView2
    ---MessageView1
    ---------MessagePropView1
    ---------MessageView2
    10> Then I have created the service interface. In service interface view instances,I include these two view and select the GetByKey operation from basic operations.
    11> From View Criteria find operations I have included the view criteria which I have created in message view in step 5.
    12> Then I run the AppModuleServiceImpl.java and select the view criteria operation which I have created in step 11.
    13> There I find two bind variables i.e. Bind_MessageId and Bind_Value. I give the values there.
    But it checks whether that message Id(Bind_MessageId) which I have given have that value(Bind_Value) or not. If it has then it shows only that message along with its properties but it is not showing me its childs and their properties.
    I want to show only those child message who have the MessageProp.value as (Bind_Value).
    I hope you understand with the scenario.
    I'll be very thankfull to you if you help me to do this.
    Rohit.

  • 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

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

  • Bug in View Criteria for EXISTS operator

    Hello!
    I have two VO:
    DEP (ID, TITLE, STATUS)
    EMP (ID, ID_DEP, NAME)
    and viewlink DEP.ID <- EMP.ID_DEP
    in DEP VO i create view criteria and add two items:
    * DEP.STATUS <> 1000
    * the EMPVO with EXISTS operator (and after that add condition EMP.NAME contain :nName (bind var))
    start app, set "john" in search field, press button "search" and in debug console i found sql for searching in DEP:
    SELECT *
    FROM (SELECT DEP.ID,
    DEP.TITLE,
    FROM DEP DEP
    where (DEP.STATUS is null OR DEP.STATUS <> 1000)) QRSLT
    WHERE ((((EXISTS (SELECT 1
    FROM EMP EMP
    WHERE ((UPPER(EMP.NAME) LIKE
    UPPER('%' || :nName || '%')))
    AND (ID = EMP.ID_DEP))))))
    in last row present error, must be:
    AND (QRSLT.ID = EMP.ID_DEP))))))
    coz if no "QRSLT", sql parser think what need compare EMP.ID and EMP.ID_DEP.
    Present in JDeveloper 11.1.1.2.0, 11.1.1.3.0.

    We have implemented our own ViewCriteriaAdater (derived from oracle.jbo.server.OracleSQLBuilderImpl) and some custom properties to handle this. Overwrite the getFormattedRHSCompareFragment to your needs.
    Btw. I think this posting should go to the JDev forum.

  • How to populate View Criteria Item programatically

    Hi,
    I'm using Jdeveloper 11.1.2.3.0.
    I created a query panel with operator Between for EmployeeId attribute and used bind variables in the VC fromEmpId, toEmpId, and dropped the VC as a query panel on a jsf page.
    At run time, when i entered a value in the from field and tabout, to field should be populated with from field value. Can anybody let me know how to achieve this?
    I could set to value on click of search using below code in the bean, search is performed without any issue. Only thing is i want to see the value in the To Field.
    ensureVariableManager().setVariableValue("toEmpId"l, value from the From field);
    Thanks,
    Vinod

    Hi,
    Refer to blog https://forums.oracle.com/thread/2538913
    You can follow below steps.
    1)Create VOImpl for VO on which you have query based.
    2)Remove Column(eg.JobId) from standard Default ViewCriteria
    3)In VOImpl create method to Create View custom Criteria, Add element
    public ViewCriteria  addCustomVC(){            
    ViewCriteria vc = null;            
    vc = this.createViewCriteria();            
    vc.setName("customVC");        
    ViewCriteriaRow vcRow = vc.createViewCriteriaRow();        
    vcRow.setConjunction(ViewCriteriaRow.VC_CONJ_AND);        
    if(getJobId() != null){             
    vcRow.setAttribute("JobId", "' job_id = "+getJobId()+"'");         
    else {            
    vcRow.setAttribute("JobId",null);              
    vc.addElement(vcRow);
    return vc;
    4)Override standard method public String getCriteriaItemClause to exclude above columns
        @Override     public String getCriteriaItemClause(ViewCriteriaItem viewCriteriaItem) {        
    //JobId        
    if( "JobId".equals(viewCriteriaItem.getName()) ) {
                 return (String) viewCriteriaItem.getValue();          
    else
    return super.getCriteriaItemClause(viewCriteriaItem);        
    5)Override public void executeQuery() method to add custom view criteria
       @Override     public void executeQuery()     {            
    applyViewCriteria(addCustomVC(), true);            
    super.executeQuery();            
    removeApplyViewCriteriaName("customVC");    
    Thanks,
    Jeet

  • JBO-25048: Operation getAllRowsInRange is invalid for a working set view ob

    I'm new to JDeveloper, so please forgive my ignorance...but I'm having a problem creating a list binding in LOV mode. After placing the list of values attribute on the jsp and making changes in the List Binding Editor, I receive the following error when I try testing the page.
    JBO-25048: Operation getAllRowsInRange is invalid for a working set view object.
    Any suggestions or hints to help me on my way would be greatly appreciated. Thanks.

    You should consider switching your application to Immediate Mode. You typically should never need to manually call the sync() method.
    Here is some advice on Batch Mode versus Immediate Mode.
    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adftoystore/readme.html#batchmode
    Usually this error occurs if you attempt to work with an iterator binding before the prepareModel() method has been invoked in the DataAction lifecycle.
    When batch mode is being used, the prepareModel() method internally batches up all the calls to execute the view objects referred to by iterator bindings in the current binding container and then syncs the operations in a single round-trip with the (either logically- or physically- separated) middle-tier application module.

  • How to add in workitem view and how to work on the 'complete' attribute

    Whenever a manual action is defined in a workflow process , a workitem object is created.The WorkItem view contains a few attributes that pertain to the WorkItem object itself. Some of the attributes are read only and some have write permission.
    Now my question is how I should include something in the description attribute.
    Again I want to know that how should we work on the attribute 'complete'.
    Thanks

    Hi Muthu.
    Thanks for your reply.as by your reply we searched method add addSubclassAttributes in the class com.waveset.object.PersistentObject but there is no such method in the class as u mentioned.
    This is Senthil i am also from mepco college and at present i am in hyd.if u dont mind can u send across ur personal id and we strucked up on creating work item..and we are new to IDM it seems..
    regards
    Senthil...
    [email protected]

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

  • How to make operation Average work on base level of a hierarchy?

    I used Oracle OLAP 11g Sample Schema OLAPTRAIN to make a test, and found something really confused me a lot.
    Here was my steps,
    I made a dimension "TIME" with a hierarchy "calendar": all years <- year <- quarter <- month.
    And then building up two cubes,
    Cube "AVG_TEST" using dimension "TIME" with operator Average.
    Cube "SUM_TEST" using dimension "TIME" with operator Sum.
    After maintaining both dimension and cubes, I tried to query views: AVG_TEST_VIEW and SUM_TEST_VIEW and noticed the cube value based on months level were same for both of cubes. It was pretty clear that operator Average didn't work at month level within cube "AVG_TEST", but using operator Sum.
    Could any one tell me why operator didn't work on the base level of hierarchy, instead of Sum? As I have a requirement to computing average value for day level, but can't add hour level to the dimension because of huge data quantity and the speed of maintaining cube. Is there a way to make operator Average work for the base level of hierarchy?
    Any help will be really appreciated!
    Satine

    Hey Brijesh,
    Thank you for your help!
    I am still confused with it. Even month is the leaf level of dimension, but the fact data is day level precision, not month, and the value at month level still should be computed with my specified operator Average, not Sum. I mean If it could be computed with Sum (actually the value at month level was sumed up data from fact table), then why couldn't with Average at the leaf level?
    My test code is from "Oracle OLAP 11g Sample Schema OLAPTRAIN", and data looks like,
    SQL> select * from sales_fact where to_char(day_Key,'yyyy-mm')='2005-04' and rownum=1;
      QUANTITY      PRICE      SALES DAY_KEY         PRODUCT    CHANNEL   CUSTOMER
             1        125        125 13-APR-05          5298         21     284846
    SQL> select day_key,month_id from times where rownum=1;
    DAY_KEY      MONTH_ID
    31-JAN-05    JAN2005Cube name is AVG_TEST, the fact data is from sales_fact.sales. From below, it is pretty clear the value at month level was sumed up data even specified Average operator.
    SQL> SELECT * FROM AVG_TEST_VIEW where time='APR2005';
           AVG TIME
    7849372.89 APR2005
    SQL> select sum(sales) from sales_fact where to_char(day_Key,'yyyy-mm')='2005-04';
    SUM(SALES)
    7849372.89Thanks
    Satine

  • 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

  • Programatically set where clause or view criteria not working in managed bean

    I get a view using finditerator then then apply setwhere or view criteria but it does not filter the original rows. code is as follows
    DCIteratorBinding dcIter3 =
    ADFUtils.findIterator("PlanColorsIterator");    
    ViewObject cvo = dcIter3.getViewObject();
    cvo.setNamedWhereClauseParam("Plno","4000");  // not working
       /*   // not working
    cvo.applyViewCriteria(cvo.getViewCriteriaManager().getViewCriteria("PlanColorsCriteria"));
    cvo.ensureVariableManager().setVariableValue("Plno", "4000");
    cvo.executeQuery();
    /* not working
    cvo.setWhereClause("plan_no = :ThePlanType");
    cvo.defineNamedWhereClauseParam("ThePlanType", null, null);
    cvo.setNamedWhereClauseParam("ThePlanType", "4000");
    cvo.executeQuery();

    thanks for reply.
    Jdeveloper version is 11.1.1.4.0.
    Actually the vo on which I am trying to set set where is used as source to act as cursor  to get values from filtered rows using set where and copy the this cursor values to another target vo. I am not showing these source values just getting values.
    DCIteratorBinding dcIter2 =
    ADFUtils.findIterator("PlotDtl2Iterator");     
    ViewObject dvo = dcIter2.getViewObject();
    // colors to copy 
    DCIteratorBinding dcIter3 =
    ADFUtils.findIterator("PlanColorsIterator");    
    ViewObject cvo = dcIter3.getViewObject();
    cvo.setNamedWhereClauseParam("Plno","4000");
    cvo.applyViewCriteria(cvo.getViewCriteriaManager().getViewCriteria("PlanColorsCriteria"));
    cvo.ensureVariableManager().setVariableValue("Plno", "4000");
    cvo.executeQuery();
    cvo.setWhereClause("plan_no = :ThePlanType");
    cvo.defineNamedWhereClauseParam("ThePlanType", null, null);
    cvo.setNamedWhereClauseParam("ThePlanType", "4000");
    cvo.executeQuery();
    int totalCount=cvo.getRowCount();
    cvo.setRangeSize(totalCount);
    Row[] rArray=cvo.getAllRowsInRange();
    for (Row r:rArray){
    NameValuePairs nvp = new NameValuePairs();      
    nvp.setAttribute("Description",r.getAttribute("Description"));
    nvp.setAttribute("PlanNo",r.getAttribute("PlanNo"));
    nvp.setAttribute("MainAcc",r.getAttribute("MainAcc"));
    nvp.setAttribute("Plqty",r.getAttribute("Qty"));
    nvp.setAttribute("Cdkid",r.getAttribute("CdkId"));
    nvp.setAttribute("FabricCode",r.getAttribute("FabricCode"));
    nvp.setAttribute("DyeWash",r.getAttribute("DyeWash"));
    //  nvp.setAttribute("Description","test");
    Row drow = dvo.createAndInitRow(nvp);      
    dvo.insertRow(drow); 

  • Q. 2:  Powerpoint for Mac 2011  Version 1     How do I get PRESENTER VIEW to work so I can see my notes and the audience only sees the slide show?  Currently PRESENTER VIEW shows up on the flatscreen and my laptop shows only the slide show....?!

    Q. 2:  Powerpoint for Mac 2011  Version 1     How do I get PRESENTER VIEW to work so I can see my notes and the audience only sees the slide show?  Currently PRESENTER VIEW shows up on the flatscreen and my laptop shows only the slide show....?!

    As PowerPoint it a Microsoft product, you may find that you get better answers to your question on their PowerPoint forums.
    Best of luck.

Maybe you are looking for

  • How do I use a variable within paragraphFormat?

    I would like to insert the firstname of a client within paragrapgFormat(). ie: paragraphFormat(Hi #firstname#, your info......) When I output this the firstname just shows as #firstname#. Is there a way to get his to work?

  • WEB DYNPRO FOR ABAP OR BSP OR WD FOR JAVA ?

    Hello Friends, We have some bussiness reports, and we have to replace the standard GUI with web; for web dynpro of java, I think we have to first put the business code of reports to some kind of RFC and then call the rfc and etc.... is there somethin

  • Error 3253 when updating Apps in iTunes

    For a few weeks now, I can't update apps in iTunes on my iMac without having an Error 3253 : reinitializing of the connexion. The configuration of my Mac has not changed and I don't have this problem when I connect from my iPad or when I download on

  • Error on budget release

    Hello, client has installed latest enhancment package. After this I have issue with budget release. Before enhancment package everything worked. If I'm entering budget doc via FMBB where Budget doc type is with "Automatic release", it still works. If

  • Can i upgrade mail from 4.5 to 5.2

    Hello, Does anybody know if Mail can be upgraded from 4.5 to 5.2 within OS X 10.6.8? Thanks