How to reset a particular view object alone to it's initial state??

Hi,
My application contains view objects with custom data source implementation. One of my requirement is to reset the particular view object alone to it's initial state. I can't use rollback since it is at Db Transaction level. I searched in forums and finally written the following coding to achieve it. It works fine during sometime but sometimes i am getting the exception oracle.jbo.DeadEntityAccessException: JBO-27101: Attempt to access dead entity in Person, key=oracle.jbo.Key[1 -10 ]
    public void resetPersonViewObject(String voName) {
        Iterator dirtyItr = this.getEntityDef(0).getAllEntityInstancesIterator(this.getDBTransaction());
        while (dirtyItr.hasNext()) {
            Object obj = dirtyItr.next();
            if (obj instanceof EntityImpl) {
                EntityImpl entity = (EntityImpl)obj;
                String state = null;
                byte entityState = entity.getEntityState();
                switch (entityState) {
                case Entity.STATUS_INITIALIZED:
                    state = "Initialized";
                    // Don't do anything
                    break;
                case Entity.STATUS_UNMODIFIED:
                    state = "Un-Modified";
                    // Don't do anything
                case Entity.STATUS_DEAD:
                    state = "Dead";
                    // Don't do anything
                    break;
                case Entity.STATUS_DELETED:
                    state = "Deleted";
                    entity.revert();
                    // entity.refresh(Entity.REFRESH_CONTAINEES);
                    break;
                case Entity.STATUS_MODIFIED:
                    state = "Modified";
                    entity.refresh(Entity.REFRESH_UNDO_CHANGES);
                    break;
                case Entity.STATUS_NEW:
                    state = "New";
                    entity.refresh(Entity.REFRESH_FORGET_NEW_ROWS);
                    entity.refresh(Entity.REFRESH_REMOVE_NEW_ROWS);
                    break;
                System.err.println("State : " + state);
        getDBTransaction().clearEntityCache(getEntityDef(0).getFullName());
        getViewObject().clearCache();
}Questions:
1. How to achieve my requirement? Is there any code correction required?
2. How to reset the row which is actually deleted by the user?
3. The sample code shown above is applicable for all the view object instances which are created from the same entity? What should i do if i want to reset a particular instance of a view object (I may use different instance of same view object at various screens whereas i want to reset only one)
Can anyone help on this??
Thanks in advance.
Raguraman
Edited by: Raguraman on Apr 24, 2011 8:48 PM

Hi,
As per my requirement, i use various instances of same view object in various dynamic tabs only. Since each tab has its own transaction, refreshing an EO of a particular transaction will refresh only the VO instances which comes under that transaction. So it will not cause any issue for my requirement i hope.
Requirement: Need to reset a particular entity driven view object instances.
Tried Schema: Departments table of HR Schema. Tried using the Application Module tester.
Code i use:
    // Client Interface method of DepartmentsViewImpl
    public void resetView() {
        Iterator dirtyItr =
            this.getEntityDef(0).getAllEntityInstancesIterator(this.getDBTransaction());
        while (dirtyItr.hasNext()) {
            Object obj = dirtyItr.next();
            if (obj instanceof EntityImpl) {
                EntityImpl entity = (EntityImpl)obj;
                byte entityState = entity.getEntityState();
                switch (entityState) {
                case Entity.STATUS_UNMODIFIED:
                    break;
                case Entity.STATUS_INITIALIZED:
                    break;
                case Entity.STATUS_DEAD:
                    break;
                case Entity.STATUS_DELETED:
                    entity.refresh(Entity.REFRESH_WITH_DB_FORGET_CHANGES);
                    break;
                case Entity.STATUS_MODIFIED:
                    entity.refresh(Entity.REFRESH_UNDO_CHANGES);
                    break;
                case Entity.STATUS_NEW:
                    entity.refresh(Entity.REFRESH_FORGET_NEW_ROWS);
                    entity.refresh(Entity.REFRESH_REMOVE_NEW_ROWS);
                    break;
        getDBTransaction().clearEntityCache(getEntityDef(0).getFullName());
        getViewObject().clearCache();
Issue i have:
1. Add a blank row (Soon transaction has become dirty). Call the resetView() client interface. It gives me JBO-25303: Cannot clear entity cache model.eo.Departments because it has modified rows
2. Modify any row and then delete the same row. Call the resetView(). It gives me JBO-27101: Attempt to access dead entity in Departments, key=oracle.jbo.Key[10 ]
[NOTE:  Above code works fine when for simple deletion of rows, modification of existing rows, new rows]
Edited by: Raguraman on Apr 24, 2011 8:48 PM

Similar Messages

  • How to reference the Parent view Object attribute in Child View object

    Hi , I have the requirememt to generate Tree like struture to display Salary from joining date to retirement date in yearly form.I have writtent two Pl/SQL function to return parent node and child nodes(based on selected year).
    1.First function --> Input paramter (employee id, retirement date , joining date) --> return parent node row with start_date and end_date
    2. 2nd function --> input paarmter(employee id, startDate, end_date) --> return child node based on selected parent node i.e. start date and end date
    I have created two ADF view object based on two function return
    Parent Node --> select * from Table( EUPS.FN_GET_CONTR_SAL_BY_YR(employeeId,retirement Date, dateOf joining)) ;
    Child Node --> select * FROM TABLE( EUPS.FN_GET_CONTR_SAL_FOR_YEAR( employeId,startDate, endDate) ) based on selected parent node.
    I am giving binding variable as input for 2nd function (child node) . I don't know how to reference the binding variable value in child view from parent view.
    Like I have to refernce employeId,startDate, endDate values in 2nd function from parent view object. some thing like parentNode.selectedStart_date parentNode.employeeId.
    I know we can achive this writing the code in backing bean.But i want to know how can we refernce parent view object attribute values in child view object using Groovy or otherway?
    I will appreciate your help.
    Thanks

    I have two view com.ContractualSalaryByYearlyView for Parent Node and com.ContractualSalaryByYearlyView for child Node.
    I have created view link(ContractualSalYearlyByYearViewLink) betweem two view by giving common field empId, stDate , endDate.(below is the view link xml file).
    I tried give the binding attribute values using parent object reference like below in com.ContractualSalaryByYearlyView xml file but getting error
    Variable ContractualSalaryByYearlyView not recognized.I think i am using groovy expression.
    Thanks for quick response.
    com.ContractualSalaryByYearlyView xml
    <ViewObject
    <DesignTime>
    <Attr Name="_isExpertMode" Value="true"/>
    </DesignTime>
    <Variable
    Name="empId"
    Kind="where"
    Type="java.lang.Integer">
    <TransientExpression><![CDATA[adf.object.ContractualSalaryByYearlyView.EmpId]]></TransientExpression>
    </Variable>
    ContractualSalYearlyByYearViewLink.xml file
    <ViewLinkDefEnd
    Name="ContractualSalaryByYearlyView"
    Cardinality="1"
    Owner="com.ContractualSalaryByYearlyView"
    Source="true">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryByYearlyView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryByYearlyView.EmpId"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.StDate"/>
    <Item
    Value="com.ContractualSalaryByYearlyView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>
    <ViewLinkDefEnd
    Name="ContractualSalaryForYearView"
    Cardinality="-1"
    Owner="com.ContractualSalaryForYearView">
    <DesignTime>
    <Attr Name="_finderName" Value="ContractualSalaryForYearView"/>
    <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
    <Item
    Value="com.ContractualSalaryForYearView.EmpId"/>
    <Item
    Value="com.ContractualSalaryForYearView.StDate"/>
    <Item
    Value="com.ContractualSalaryForYearView.EndDate"/>
    </AttrArray>
    </ViewLinkDefEnd>

  • How To change the ADF View Object  query where-clause at RunTime?

    I am trying to create a simple display page which will display user data (username, assoc_dist_id, assoc_agent_id, status , etc). The User data is stored in a database table and i am using an ADF Read Only table based on the View Object to display the data on the JSF page.
    However, i want to display only the users that a particular person accessing the page has the AUTH LEVEL to see. e.g. If the person accessing the page is an 'ApplicationAdministrator' then the page should display all users in the table, If its a 'DistributorAdministrator' then the page should display only users associated with that Distributor (i.e. assoc_dist_id = :p_Dist_id ) and If its an 'AgentAdministrator' , then the page should display only users associated with that Agent ( i.e. assoc_agent_id = :p_Agent_id).
    Currently my af:table component displays all the users in the table because the query for the view object is (select * from users) . However, i want to use the same viewobject and just set the where-clause at runtime with the appropriate parameter to restrict the dataset returned.
    Do anyone knows how to accomplish this ?

    David,
    See the custom method initializeDynamicVariableDefaults() in the SRViewObjectImpl.java class in the FrameworkExtentions project in the SRDemoSampleADFBC sample application. You can find out how to install the demo if you haven't already from the ADF Learning Center at:
    http://www.oracle.com/technology/products/adf/learnadf.html
    This class is a framework extension class for view objects that adds a neat, generic feature to be able to dynamic default the value of named bind variables. You can read more about what framework extension classes are and how to use them in Chapter 25, "Advanced Business Components Techniques" of the ADF Developer's Guide for Forms/4GL Developers, also available at the learning center above.
    It is an example of generic framework functionality that "kicks in" based on the presence of custom metadata properties on a named bind variable. See section 25.3.3 "Implementing Generic Functionality Driven by Custom Properties" in the dev guide for more details. Using this sample code, if you add a bind variable to a view object, and define a custom metadata property named "DynamicDefaultValue" on that bind variable, and set this custom metadata property to the value "CurrentUser", then that bind variable will have its value dynamically defaulted to the name of the authenticated user logged in. If instead you set this custom property to the value "UserRole", then the bind variable will be set to the comma-separated string containing the list of roles that the authenticated user is part of.
    Once you've created a framework extension class for view objects like this, you can have the view objects you create inherit this generic functionality.See section 25.1.4 "How to Base an ADF Component on a Framework Extension Class" in the dev guide for more info on this.
    By adapting a technique like this (or some idea similar that better suits your needs) you can have your view object query contain bind variables whose values automatically take on the defaults based on something in the user-session environment.

  • How to prevent creation of view object rows when using browser refresh butt

    HI i have the following problem:
    I have a creation form using a partial submition. The problem is that if i have entered some value by using autosubmit , this value will be setted as attribute in the ViewObject . After that if i click refresh button of the browser then the new Row of the view object will be created and i will have a pending row with setted attribute. So if execute commit then the both rows will be tried to commit. How can i prevent this?
    Krasi

    Hi,
    If i've understood you have a invokeAction that create a new row, right? If yes put on condition that it invokeAction won't invoke if is a postback.
    Let me know if i miss understand your doubt.
    Best Regards

  • How to retrieve rows in view object and display on UI

    Hi All,
    I am new to ADF. i am using jdeveloper11.1.1.5.0 . Here is my scenario.
    In my AM i have a view object say EmployeeVo. on empVo i am performing setRangeStart and setRangeSize.
    empVo .setRangeStart(2);
    empVo .setRangeSize(2);
    Rows[] rows=empVo .getAllRowsInRange();
    so from the above statement will get two rows from the empVo object. Now i have to display these rows in UI in the form of af:table.
    Can anyone suggest how to acheive this.
    Thanks in advance.

    <af:table value="#{Bean.listValue}" var="row" />
    //refer rows like
    <af:column>
    <af:inputText value="#{row.description}" />
    </af:column>
    List listValue = new ArrayList();
    //getter setter of listValue
    //bean constructor
    retrieve the rows from the AM methodthe above step is very crude hope you understand the steps

  • How to populate data into view object

    Hi all,
    I am quite new with ViewObject.
    I have one data table which is binding with view object.
    I want to populate data into view object from my managed bean.
    how can i achieve this kind of scenario?
    actually i try to get view object as in the following. but i get only null.
    ViewObject viewobject = DCIteratorBinding.getViewObject();
    With Regards,
    Wai Phyo

    Hi,
    You could use the following code snippet to get handle to view object from the iterator.
    FacesContext fc = FacesContext.getCurrentInstance();
    BindingContainer bindings =
    (BindingContainer)fc.getApplication().evaluateExpressionGet(fc,
    "#{bindings}",
    BindingContainer.class);
    DCBindingContainer bc = (DCBindingContainer)bindings;
    DCIteratorBinding iterator =
    bc.findIteratorBinding("<ITERATOR_ID>");
    ViewObject viewObject = iterator.getViewObject();
         // Perform operations on the view objectThanks,
    Navaneeth

  • How do I make a view object containing two entity objects updatable?

    I have a view object that contains attributes from two entity objects. The query looks like this
    SELECT AplCfgPartyEO.ID,
    AplCfgPartyEO.ID_HRM_BRW_JOB,
    HrmBrwJobEO.CREATED_BY,
    HrmBrwJobEO.CREATION_DATE,
    HrmBrwJobEO.ID AS ID1,
    HrmBrwJobEO.ID_HRM_BAS_JOB_TYPE,
    HrmBrwJobEO.JOB_NO,
    HrmBrwJobEO.MODIFIED_BY,
    HrmBrwJobEO.MODIFY_DATE,
    HrmBrwJobEO.ORIGIN,
    HrmBrwJobEO.PICTURE
    FROM APL_CFG_PARTY AplCfgPartyEO, HRM_BRW_JOB HrmBrwJobEO
    WHERE AplCfgPartyEO.ID_HRM_BRW_JOB = HrmBrwJobEO.ID
    My problem is that I am only allowed to update the attributes from the AplCfgPartyEO entity object while the attributes from the HrmBrwJobEO entity object become read only. I want to be able to update all of the attributes how do I do that?

    If someone will read this later I can inform them that I am using Studio Edition Version 11.1.1.0.2 at the moment. Thanks Chris, your answer solved my problem but I was a little surprised though that it wasn´t updatable by default.

  • How to access query based view object in backing bean

    Hi
    I am using JDev11.1.2.1.0
    I want to use the query result of query based view object in backing bean.
    How can i do the same
    Please Solve this
    Thanks

    Hi,
    Assuming ADF is in the picture
    1. Create a PageDef file for the page (right mouse click "Go to Page Definition")
    2. In the Executable section, create an iterator for the View Object
    3. In the managed bean:
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    DCIteratorBinding iter = (DCIteratorBinding ) bindings.get("name of Iterator");
    iter.execute();
    // ... navigate the iterator rows ...//
    Frank

  • How to not have your view objects query before the page comes up?

    Hello. I have a view object that is part of a LOV. This view object always gets queried on bringing up the page (I need it to happen on the LOV click) How can I have the VO not queried initially? I tried setting the Iterator to refresh never, but it still does it. Here's the log before the page comes up:
    [363] BindingContext.put( ContactsAMDataControl@irepair_DataBindings_cpx, oracle.jbo.uicli.binding.JUApplication )
    [364] Resolving VO:ContactsVVO1 for iterator binding:ContactsVVO1Iterator
    [365] Changing iterator range size from :1 to :25
    [366] ContactsVVO1 ViewRowSetImpl.execute caused params to be "un"changed
    [367] Column count: 13
    [368] ViewObject: ContactsVVO1 Created new QUERY statement
    [369] ContactsVVO1>#q computed SQLStmtBufLen: 663, actual=623, storing=653
    [370] select
    oc.JOB_TITLE,
    oc.PARTY_SITE_ID,
    RELATIONSHIP_ID ,
    hp.PARTY_NAME OBJECT_NAME, -- Contact
    OBJECT_ID ,
    hr.PARTY_ID ,
    oc.CONTACT_KEY,
    subject_id,
    hp.EMAIL_ADDRESS,
    hp.primary_phone_country_code,
    hp.primary_phone_area_code,
    hp.primary_phone_number
    from HZ_ORG_CONTACT_ROLES ocr,
    HZ_ORG_CONTACTS oc,
    HZ_PARTIES hp,
    HZ_RELATIONSHIPS hr
    where
    hp.party_id = hr.object_id
    and hr.RELATIONSHIP_ID=oc. PARTY_RELATIONSHIP_ID
    and oc.ORG_CONTACT_ID = ocr.ORG_CONTACT_ID(+)
    and relationship_code = 'CONTACT'
    order by OBJECT_NAME
    [371] Bind params for ViewObject: ContactsVVO1
    [372] DCUtil, returning:oracle.adf.model.binding.DCParameter, for ContactsAMDataControl
    [373] LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1 ViewRowSetImpl.execute caused params to be "un"changed
    [374] Column count: 13
    [375] ViewObject: LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1 Created new QUERY statement
    [376] LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1>#q computed SQLStmtBufLen: 663, actual=623, storing=653
    [377] select
    oc.JOB_TITLE,
    oc.PARTY_SITE_ID,
    RELATIONSHIP_ID ,
    hp.PARTY_NAME OBJECT_NAME, -- Contact
    OBJECT_ID ,
    hr.PARTY_ID ,
    oc.CONTACT_KEY,
    subject_id,
    hp.EMAIL_ADDRESS,
    hp.primary_phone_country_code,
    hp.primary_phone_area_code,
    hp.primary_phone_number
    from HZ_ORG_CONTACT_ROLES ocr,
    HZ_ORG_CONTACTS oc,
    HZ_PARTIES hp,
    HZ_RELATIONSHIPS hr
    where
    hp.party_id = hr.object_id
    and hr.RELATIONSHIP_ID=oc. PARTY_RELATIONSHIP_ID
    and oc.ORG_CONTACT_ID = ocr.ORG_CONTACT_ID(+)
    and relationship_code = 'CONTACT'
    order by OBJECT_NAME
    [378] Bind params for ViewObject: LOCALVIEW_USAGE_com_craneae_services_hz_vvo_ContactsVVO_ContactsVVO1
    Thanks!
    Edited by: user621288 on Jun 17, 2009 4:11 PM

    There are two ways:
    1. Uncheck "Query List Automatically" under List UI Hints in the view object overview xml.
    2. In the query add "where 1=:bnum and 1 is not null" and execute the query in the LaunchPopupEvent
        public void userIdId_launchPopupListener(LaunchPopupEvent launchPopupEvent) {
            DCIteratorBinding myListIter = (getItrtBindings("MyLovViewObj1Iterator"));
            ViewObject vo = myListIter.getViewObject();
            NavigatableRowIterator myItemList = myListIter.getNavigatableRowIterator();
            Row row = myItemList.first();
            Object[] val = row.getAttributeValues();
            ViewRowSetImpl vor = (ViewRowSetImpl)val[row.getAttributeCount() - 1];
            vor.setNamedWhereClauseParam("bnum", new BigDecimal(1));
            vor.executeQuery();
        }

  • How do I query changed view object attribute in another view object

    Jdeveloper 10.1.3.4
    My requirement is that I want to be able to query a view object (based on entity) on a non-key attribute where the value I am searching on may either be in the database on an existing record or, have just been recorded by updating a different view object based on the same entity (and yet to be committed).
    When querying the second view object for a value just updated via a different view object, the second view object always returns no rows. I had expected the process to be :
    EntityA
    ViewObjectA based on EntityA
    ViewObjectB based on EntityA
    ViewObjectA - query row with key = 123. update attribute Y with value 456 (attribute Y in database null). Entity cache for EntityA, key 123, atttribute Y updated with value 456
    ViewObjectB - query row with attribute = Y. expect record in EntityA cache just updated to be returned. Instead, nothing is returned
    Here is the code I was using (where RandScheduleEdit and RandScheduleSearch are identical view objects based on entity object RandSchedule)
      public static void main(String[] args) {
        String        amDef = "test.cache.model.AppModule";
        String        config = "AppModuleLocal";
        ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
        ViewObject rsEdit = am.findViewObject("RandScheduleEdit");
        Key rsKey = new Key(new Object[]{40});
        Row[] rsEditRows = rsEdit.findByKey(rsKey,1);
        Row rsEditRow = rsEditRows[0];   
        rsEditRow.setAttribute("SId", new Number(7827));
        ViewObject rsSearch = am.findViewObject("RandScheduleSearch");
        rsSearch.setWhereClause("S_ID = :SId");
        rsSearch.defineNamedWhereClauseParam("SId", null, null);
        rsSearch.setNamedWhereClauseParam("SId",new Number(7827));
        rsSearch.executeQuery();
        Row rsSearchRow = rsSearch.first();
        Configuration.releaseRootApplicationModule(am, true);
      }Why does rsSearch not find the record S_ID = 7827 ? It seems to only be querying new records in the database and ignoring the cached record just updated ?
    Any help greatly appreciated.
    Cheers,
    Brent

    rsSearch.setNamedWhereClauseParam("SId",new Number(7827));This might help:
    rsSearch.setQueryMode(ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    rsSearch.executeQuery();

  • How to call a Particular View from a View of Current Component

    Hi Experts,
    Pls let me get a solution for my small issue..
    I do have 2 components cur_component and old_component which contain 2 Views each say, cur_vew1 & cur_view2 and old_view1 & old_view2 respectively.
    Now, When i click a button in cur_view1 then it should call the view - old_view1 of old_component and when i click a button in cur_view2 then it should call the view - old_view2 of old_component.
    When i tried, its calling the default view of the old_component. but i want to call the views of the old_component dynamically...
    hope am clear enough about my issue..
    Kindly help on me on this to solve this..
    With Thanks in advance,
    Amala

    hi ,
    have u done component usage to reuse ur old component in ur new component .
    refer this article on component usage :
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a33195f
    to know , how to set the context attribute for visibility , u wud also like to go to this thread :
    Re: How to SET a value to an attribute usibng WIZARD?
    refer to Uday's reply in this thread as well  :
    Call view of another WDA Component and pass the value to it
    1) When you create your context at component controller level in component MAIN you have a property for the node which says as: "Interface Node" Just checkmark this checkbox. When you do this you would be able to share the data within your context nodes across other components.
    2) Specify a default value of AA in the "Default Value" property of the attribute in component MAIN
    3) Now go to your other component SUB which you would like to also get initialised. Define a usage of your component MAIN within this component.
    4) Go to your component controller & create your context node & attribute with exactly the same names as how you had created in your MAIN component.
    5) Do a mapping between the interface controller of your MAIN component & the component controller of your SUB component
    6) You would be able to see that the appearance of the node has changed to an interface node. This means that your SUB component now has an exact replica of your MAIN components context data.
    regards,
    amit
    Edited by: amit saini on Oct 13, 2009 2:47 PM

  • How to create LOV on view object with itself

    Hi
    My scenario is that I have COUNTRY table with columns Country_Code and Country_Name.
    I need to display the Country_Name as selectonechoice. User will select some country name and then I should get the Country_Code associated with the selected Country_Name in Managed bean.
    Could you please suggest how to achieve this?
    Regards,
    Vinod

    Hi
    My English isn't very good.
    create a view obj on COUNTRY table then from Data Control drag&drop view obj as a Single Selection and then select Adf Select One Choice and from there you can select which attribute to display.
    in managed bean you can get the Country_Code from the below code:
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iteratorRow =
    (DCIteratorBinding)dcBindings.get("iterator name for view obj");
    Row row = iteratorRow.getCurrentRow();
    System.out.println("row[]=" + row.getAttribute(0));
    Habib

  • How to define attributes at view object level ?

    Hi,
    I am defining one attribute at view level and also i am declare a bind variable.
    eg: attribute name:days Bind variable: :Enter_The_Days
    and In the days attribute-->(scheduledshippeddate-requestdate)
    and In the where condition Days>:Enter_The_Days
    But at the time of running the application module,It returns error. Can you please help me on tha.

    It returns errorWhat error does it return?
    John

  • How to pass parameter to view object

    hi, I want to create lov with "where clause" depends on one attribute in ui fragment

    hi,
    think this will help u,
    http://technology.amis.nl/2011/11/28/synchronize-viewobject-queryies-by-dynamically-linking-bind-parameters/
    https://kr.forums.oracle.com/forums/thread.jspa?threadID=2392894
    try to make lov passing parametor from view criteria. orelse set it in backing bean.
    http://andrejusb.blogspot.com/2008/12/cascading-lovs-in-oracle-adf-11g-update.html
    http://www.jobinesh.com/2011/03/initializing-bind-variables-in-query.html
    thks.

  • How to pass parameters to view object having oracletext keyword contains

    Hi ,
    I am using the below query to get the document details in irecruitment with the matching keywords
    contains (doc.character_doc,:SR,1) >0_ -condition to get the key word search provided by oracletext
    i am not able to pass the value to the parameter :SR using vo.setSR or vo.setWhereClauseparams
    please suggest on this.
    This is the query :
    SELECT score (1) AS score, doc.document_id, doc.file_name,
    doc.last_update_date, ppf.email_address, addr.derived_locale,
    addr.address_id, ppf.full_name, inp.notification_preference_id,
    ppf.person_id, ppf.effective_start_date, ppf.effective_end_date,
    ROWNUM AS rownumber, pov.vendor_id, pov.vendor_name,
    inp.creation_date, NULL AS selectflag,
    (SELECT meaning
    FROM hr_lookups
    WHERE lookup_code = ircreferralinfoeo.source_type
    AND lookup_type = 'REC_TYPE') AS sourcetype,
    DECODE
    (ircreferralinfoeo.source_type,
    'ER', (SELECT full_name
    FROM per_all_people_f ppf3
    WHERE ppf3.person_id = ircreferralinfoeo.source_person_id
    AND SYSDATE BETWEEN ppf3.effective_start_date
    AND ppf3.effective_end_date),
    ircreferralinfoeo.source_name
    ) AS sourcename
    FROM irc_notification_preferences inp,
    irc_documents doc,
    per_addresses addr,
    per_all_people_f ppf,
    po_vendors pov,
    irc_referral_info ircreferralinfoeo
    WHERE trunc(sysdate) BETWEEN ppf.effective_start_date AND ppf.effective_end_date
    AND doc.person_id = inp.person_id
    AND inp.person_id = addr.person_id(+)
    AND NVL (inp.address_id, DECODE (addr.address_type(+), 'REC', addr.address_id(+),
    -1)) = addr.address_id(+)
    AND trunc(sysdate) BETWEEN addr.date_from(+) AND NVL (addr.date_to(+), sysdate)
    AND doc.person_id = ppf.person_id
    AND doc.TYPE IN ('RESUME', 'AUTO_RESUME')
    AND doc.end_date IS NULL
    AND EXISTS (SELECT NULL
    FROM per_people_f ppfs
    WHERE ppfs.person_id = doc.person_id)
    **AND contains (doc.character_doc,:SR,1) >0**
    AND ( (inp.agency_id = fnd_profile.VALUE ('IRC_AGENCY_NAME'))
    OR ( fnd_profile.VALUE ('IRC_AGENCY_NAME') IS NULL
    AND inp.allow_access = 'Y'
    AND inp.agency_id = pov.vendor_id(+)
    AND ppf.party_id = ircreferralinfoeo.object_id(+)
    AND SYSDATE BETWEEN ircreferralinfoeo.start_date(+) AND ircreferralinfoeo.end_date(+)
    ORDER BY score (1) DESC
    Thanks
    Maheswara Raju

    Gyan,
    find the error message
    Exception Details.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT score (1) AS score, doc.document_id, doc.file_name,
    doc.last_update_date, ppf.email_address, addr.derived_locale,
    addr.address_id, ppf.full_name, inp.notification_preference_id,
    ppf.person_id, ppf.effective_start_date, ppf.effective_end_date,
    ROWNUM AS rownumber, pov.vendor_id, pov.vendor_name,
    inp.creation_date, NULL AS selectflag,
    (SELECT meaning
    FROM hr_lookups
    WHERE lookup_code = ircreferralinfoeo.source_type
    AND lookup_type = 'REC_TYPE') AS sourcetype,
    DECODE
    (ircreferralinfoeo.source_type,
    'ER', (SELECT full_name
    FROM per_all_people_f ppf3
    WHERE ppf3.person_id = ircreferralinfoeo.source_person_id
    AND SYSDATE BETWEEN ppf3.effective_start_date
    AND ppf3.effective_end_date),
    ircreferralinfoeo.source_name
    ) AS sourcename
    FROM irc_notification_preferences inp,
    irc_documents doc,
    per_addresses addr,
    per_all_people_f ppf,
    po_vendors pov,
    irc_referral_info ircreferralinfoeo
    WHERE trunc(sysdate) BETWEEN ppf.effective_start_date AND ppf.effective_end_date
    AND doc.person_id = inp.person_id
    AND inp.person_id = addr.person_id(+)
    AND NVL (inp.address_id, DECODE (addr.address_type(+), 'REC', addr.address_id(+),
    -1)) = addr.address_id(+)
    AND trunc(sysdate) BETWEEN addr.date_from(+) AND NVL (addr.date_to(+), sysdate)
    AND doc.person_id = ppf.person_id
    AND doc.TYPE IN ('RESUME', 'AUTO_RESUME')
    AND doc.end_date IS NULL
    AND EXISTS (SELECT NULL
    FROM per_people_f ppfs
    WHERE ppfs.person_id = doc.person_id)
    AND contains (doc.character_doc,:1,1) >0
    AND ( (inp.agency_id = fnd_profile.VALUE ('IRC_AGENCY_NAME'))
    OR ( fnd_profile.VALUE ('IRC_AGENCY_NAME') IS NULL
    AND inp.allow_access = 'Y'
    AND inp.agency_id = pov.vendor_id(+)
    AND ppf.party_id = ircreferralinfoeo.object_id(+)
    AND SYSDATE BETWEEN ircreferralinfoeo.start_date(+) AND ircreferralinfoeo.end_date(+)
    ORDER BY score (1) DESC
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1566)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2996)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.handleSubmitButton(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequestAfterController(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    java.sql.SQLException: Missing IN or OUT parameter at index:: 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
         at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1566)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2996)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3043)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:857)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:666)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3655)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:742)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:891)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:805)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:799)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3575)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.handleSubmitButton(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequestAfterController(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
         at OA.jspService(_OA.java:71)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Thanks
    Maheswara Raju

Maybe you are looking for

  • Vague problem description, looking for hints

    Hello, I am maintaining several Swing based apps, written by a number of different people (different generations, skills and knowledge) of which most of them are gone already. There's this user reported bug which clearly describes his problem, but as

  • Odd iBook question - g4 board in a g3 case?

    After dealing with another logic board failure on my iBook g3, I have reached the point of wondering if I should avoid the g3 boards entirely and go with an iBook g4 board this time. Does anyone know if the logic board from a 12" iBook g4 will physic

  • Why won't my AppStore load

    I click the App Store it opens but wont load any apps

  • How do I make a placed image the full width of the browser?

    Hi, I've tried adding the image as the browser fill only to have it shuffling all other placed objects out of wack. I've also tried having it as a placed object but, when I preview in browser I can't seem to be able to get it the full which of the sc

  • Consolidation Percentage

    When i kick off a consolidation it quickly goes to 97% the it takes about 30 minutes to finish to 100%. What is the percentage measuring? Amount of entities? Its definitely not time.