Problem with saving Parent - Child  View Objects in ADF 11g.

Hi Every one,
I have a requirment, something like I will be displaying some data on my jsff screen based on one Transient View Object. Whenever user clicks on Save button, I have to do following steps in my AMImpl.
-> Preapre dynamically Parent View Object Rows based on some logic
-> Prepare dynamically Child View object Rows and invoke insertRow method on respective child view object.
When I say commit() First Parent ViewObject data need to be saved and then Child View object data has to be saved. I am having Parent - Child Key relation ship btw these two ViewObjects. Some how I am populating the Parent Primary key in the Child View Object. Please suggest me If there is any other alternative to this.
Thanks

I got the solution, Enabling the check box option for Master - Detail Entity association (CompositionAssociation -> Cascade Update Key Attributes) resolved the issue.
Thanks

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>

  • Issue :  Child view object refresh problem,

    Hi ,
    Child view object refresh problem,
    Detail expaination of problem with DEPT and Emp table:
    I have two pages first.jspx and secound.jspx
    In the First page we are showing one department and All Employee blongs to that department. Employees are shown in table format.
    and i have duplicate button in table--> this will create a duplication record of selected employee by calling application module
    and the control moves to sencound page to show the newly created Employee details.
    From secound form am returning back with some action button to previous page to the same dept , The newly created records are not showing in the table [but the database has newly crated].
    How do i refresh the child view object ?
    Regards,
    Bogi.

    Hi Frank,
    We are creating new record from the AM with help of ADFBC.
    Would like know how to refresh UI Datacollection and AM view objects.. ? i have added vo.executeQuery in AM . But the changes not reflecting in UI,
    Thanks for the reply... am ready to give any other info required,,,

  • How to set query for child View Object?

    I have a hGrid in standard page. Two View Objects are present connected using view link. I need to set where clause in the child View Object. The changes are not getting reflected when i set the where clause. Also when i try to fetch rowCount it returns 0 for child View Object. But i am able to get the value for parent View Object. Any suggestions please.

    Hi,
    This solution worked for me last time, Please create One blank row and delete that row(For Child VO).
    Why we are doing this? : Because the child vo pointer might not init. See this is not our fault, this is because of OA Framework. But this works for me :)
    Thanks,
    Shrikant

  • Dinamically sorting child view object

    Hi
    i have a master-child relationship between 2 view objects displayed in jsff as master form - detail table fashion.
    By default, child is ordered by, for eg.,  attr1.
    There is a button that opens popup with child records which need to be ordered by another attribute (attr2).
    Basically, child view object should be ordered one way when displayed in jsff, and on the other way when displayed in popup.
    What is a best practice to deal with this kind of requirement?
    JDev 11.1.2.3
    Thanks

    Hi,
    You can generate the VOImpl for the ViewObject and create a method, which would take the order by clause. Expose this as client interface and then you can pass respective column name to order by dynamically and execute the method before opening the popup.
    Ex :
        public void setOrderBy(String orderBy){
            this.setOrderByClause(orderBy);
            this.executeQuery();
    -Arun

  • Error, problem with saving documents, Illustrator

    I have a problem with saving documents in Adobe Illustrator (CS6): when I import to my document some jpg, tiff etc (even it isn't huge) Illustrator is crashed ("program to stop working correctly because of a problem. Windows will close the program and notify you if there is a solution available."). Next: program close.
    But when I work only with objects from AI - everything is ok - any error, I can save it.
    I have reinstalled and updated AI. And nothing changed.
    What is a problem?

    <moved from Downloading, Installing, Setting Up to Illustrator>

  • Problem with saving a pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21).

    Need advice on a saving file issue. I'm having problem with saving a .pdf file to computer. Continually get an error message " This document could not be saved. There was a problem reading this document (21). This is new as this error message just recently started to pop-up.

    More information about this issue can be found here:
    https://forums.adobe.com/thread/1672655
    A "quick" fix that worked for me was to uninstall Adobe... then download the base install for Adobe Reader 11.0.
    Then download each of the individual updates and run them sequentially. 
    I've installed back up to the last security update which is version 08 and have been able to do normal Save As operations.
    You will have to disable automatic updates in order to stay at version 08 until Adobe resolves this issue in a later release.
    http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
    Adobe Reader 11.0 - Multilingual (MUI) installer    AdbeRdr11000_mui_Std
    Adobe Reader 11.0.01 update - Multilingual (MUI) installer    AdbeRdrUpd11001_MUI.msp
    Adobe Reader 11.0.02 update - All languages    AdbeRdrSecUpd11002.msp
    Adobe Reader 11.0.03 update - Multilingual (MUI) installer    AdbeRdrUpd11003_MUI.msp
    Adobe Reader 11.0.04 update - Multilingual (MUI) installer    AdbeRdrUpd11004_MUI.msp
    Adobe Reader 11.0.05 security update - All languages    AdbeRdrSecUpd11005.msp
    Adobe Reader 11.0.06 update - Multilingual (MUI) installer    AdbeRdrUpd11006_MUI.msp
    Adobe Reader 11.0.07 update - Multilingual (MUI) installer    AdbeRdrUpd11007_MUI.msp
    Adobe Reader 11.0.08 security update - All languages    AdbeRdrSecUpd11008.msp

  • Problems with saving edited photos using Photoshop Elements 5.0 on WIndows 8.

    Since a week I can not save the edited photos - when I try the communicate: "Caould not complete your request because of a program error" appeares. I had no problem with saving edited photos before, with the same software. My computer runs on Windows 8, 64 bit version. My Photoshop Elements is version 5.0. Where is the problem?

    W dniu 2013-06-16 15:36, dj_paige pisze:
    >
    Yes, I did it long ago.

  • Problem with create universe on Business Objects XI 3.1 base on SAP Query

    Hello,
    I have a problem with create universe on Business Objects XI 3.1 base on SAP Query.
    The problem is hierarchy. Massage on Busines Objects is :
       OWBS_ELEMT__ISTKOSZT(cube ICPC01/BEX_ICOC01):Exception condition  "HIERARCHY NOT FOUND" raised.(WIS 10901) 
    Query in BEX run OK.
    Best regards.
    Ela.

    Hello,
    Thanks for response.
    When I run BEX QUERY, all works OK.
    All hierarchies was created and activated  on system BW.
    This situation appears after upgrade BW to SAP NetWeaver 7.3.
    Before upgrade I created universe without any problems.
    Regards Ela

  • Problem with "Saved with Id" in Reports

    Hi Group,
    I am having problem with "Saved with id" functionality.
    1.) I created a Query in sq01 as "query1".
    2.) Copied the source code of this query into a z program
    ztest_query.
    3.) Now executed the report "ztest_query" in background with "Saved with Id" checkbox checked and id as "1234".
    4.) Now where/how can I search for this id "1234" to retrieve my list.
    5.) Normally if I dont change the report name and use the program aq*query1 which is self generated one, this works and I am able to retrieve the saved list from Transaction
    SQ01.
    Please let me know how this can be achieved.
    Regards
    Ankur Bhandari

    Ankur,
    Did you find a solution for this problem. Not many seem to be using this "Save list to id" functionality.
    Thanks
    Vyas

  • Having problems with texts width when viewed in Firefox

    I My site is OK when viewed in Chrome and Safari, but in Firefox, the width of paragraphs is becoming very long and all is displayed wrong.
    I need a clue where to look to fix. I have not , or very little knowledge of HTML code. So I rely on the DW CS5 interface.
    Thanks,D.

    Thanks Nancy ,
    I'll try,
    Should I just paste your info between the brackets, I guess.
    I am not so good with this but I need to spent a bit of time to fix this
    old web site while another one is being designed.
    Yes the images are too big, I'll reduce them, and optimize. This was
    done in a rush..
    D.
    Le 14-02-23 18:07, Nancy O. a écrit :
    >
          Re: Having problems with texts width when viewed in Firefox
    created by Nancy O. <http://forums.adobe.com/people/Nancy+O.> in
    /Dreamweaver support forum/ - View the full discussion
    <http://forums.adobe.com/message/6149874#6149874

  • Problems with saving a file

    Hello,
    Im having problems with saving files on my computer, from Mail and Safari. I have 900gb free diskspace, but i simply cant save anyhow, it says my disk is full.
    Have i accidentally locked something up?
    Regards,
    Niclas

    Run disk utility on your hard drive to repair your permissions.  http://support.apple.com/kb/HT1452

  • Problems with Saved Watermarks - Wrong Font Size

    Hi,
    I am having problems with "Saved" Watermarks, as when I selected them they have the wrong font size.
    I created a Watermark (Draft) to be placed on the lower right
    corner of a PDF, using font Arial-10. This watermark has been save using the "Save Settings..." in Watermarks.
    When I add this this "saved" watermark to a new PDF, the font size is wrong
    (much much bigger), even though the Add Watermark windows reports Arial-10. Only by a selecting a different font size and changing it back to the saved font size (10) I get the correct Font Size in the PDF.
    I had a similar problem with the placement, but managed to solve that by setting the Preference>User&Guide to the used Unit (Page&Ruler = centimeters). But for the font size I can't find anything in the preference.
    Any Help or Suggestions ?

    Hi,
    Sorry forgot to add, I am using
    Acrobat Professional 8.1.2 on Windows XP Prof.
    Cheers
    Johannes

  • How to update a list in parent view with data from child view/window ?

    I have a view named AccountListView that displays some buttons and a list of accounts.Its viewmodel is called AccountListViewModel and has a collection : ObservableCollection<AccountViewModel>. What I'd like to acomplish: whenever I press the Add/Edit
    Button from the AccountListView to open a new window/usercontrol, i.e. AccountView and bind it to an instance of AccountViewModel that will have some fields to fill in and a Submit and Cancel buttons. How can I update the ObservableCollection<AccountViewModel>
    from  inside the child view, so when I click on the Submit button from AccountViewModel it will return an AccountViewModel object with the data I filled in and add it to the observablecollection. Would notifications from prism be the right way ? Should
    I include code from the AccountListViewModel and AccountViewModel ?

    The way to communicate between view models in Prism is to use the EventAggregator. You raise an event from view model A and subscribe and handle this event in view model B. I have written a blog post about it which should be helpful here:
    http://blog.magnusmontin.net/2014/02/28/using-the-event-aggregator-pattern-to-communicate-between-view-models/.
    In your case you could define an event that carries an AccountViewModel object and pass this one from view model A to view model B:
    public class AccountViewModelEvent : CompositePresentationEvent<AccountViewModel>
    Please refer to the blog post for more information and a complete code example.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • Performance problem with select from _DIFF view

    Hi,
    we have a versioned table with more then one million records. We use the DBMS_WM.SetDiffVersions procedure and select from DIFF view to get data differences between two workspaces. The problem is that the select from the DIFF view is very slow. I takes more than 15 minutes. Has anybody an idea why it consumes so much time? Is there any way how to improve it?
    Thanks and regards
    Ondrej

    Hi,
    This can be due to any number of things, but is typically caused by an inefficient optimizer plan. Make sure that statistics on the _LT table have been recently analyzed.
    Also the following information would be useful:
    1. What is the relationship of the workspaces that you are trying to compare (parent/child, children of the same parent, etc) ?
    2. How many and of what type dml are being performed in the workspaces ?
    3. What version of Workspace Manager are you using and what is the version of the database ?
    4. What is the time needed to select from the _DIFF view based on the primary key ?
    Regards,
    Ben

Maybe you are looking for