How to refresh parents externally changed collection of child objects

Hello,
we have an external process which updates the database independently from TopLink. We receive a notification whenever objects are created or deleted.
We have an object A that contains a collection of B's. When a B is inserted or deleted in the database, we get an insert- or delete-event for B. But we also need to refresh the object A to reflect the changed collection in our object model.
Is there any TopLink mechanism we can use to do this automatically? Otherwise we will have to manually find all the objects that reference the inserted or deleted B and refresh them as well.
We are grateful for any suggestions.

Hello Don,
thank you for your answer. We have the back reference and at the moment follow the approach you suggested. But as a consequence we have to handle each class B individually, i. e. given our knowledge of the object modell we have to hand-code for each class B a method that refreshes all the objects referring to it. Since the necessary information to do this seems to be available in the TopLink descriptors we were wondering whether there exists a more generic way. E. g. we thought about analyzing B's descriptor and follow all one-to-one mappings to the referred objects and find out if their descriptors in turn contain a collection mapping to B in which case we would refresh them. Unfortunately that won't work in case of n:m mappings where no back reference exists.
Another possibility would be to go over the TopLink cache and refresh every entry that refers to the object in question, but we do not know how this could be done (and if it is advisable).
Best regards
Achim

Similar Messages

  • Refreshing Parent.jsp and forwarding to Child.jsp

    Hi
    I have a parent.jsp where I provide criteria to query and export the data to excel. If the resultset is null I forward to parent.jsp with error message, but if there is data I forward to child.jsp.
    If in the first attempt there is no data and display of error message in parent.jsp and in the subsequent second attempt I change the selection criteria and get the data report in excel format, but the error message displayed in parent.jsp for the earlier transaction remains the same i.e. parent.jsp should ideally refresh and then forward to child.jsp.
    Currently I am using the following code and controlling it with a script that is called on click of submit i.e. I set the text (error text) value to null. Is there a better way to achieve this? Kindly help
    <%if (error != null) {%>
    <table>
    <tr>
    <td>
    <input type="text" name="errorMsg"
    style=" color:red; font-size: 8pt; FONT-FAMILY: verdana, helvetica;font-style: TT; border:'0'; font-weight: Bold"
    value='<%= error %>'
    size="141" readonly="readonly"/>
    </td>
    </tr>
    </table>
    <%}%>

    Thanks a lot frndz.. for your reply.. but both ways I tried its not working ..Devendra I went thru the code given there in the link but it couldn,t work... I tried for window.opener.refresh(). In spite of refreshing the parent jsp and getting the pop up closed ,it displayed the the refreshed parent JSP in the pop up window. keeping parent JSP intact..
    Any other alternative can anyone advise... :)

  • How to update after external change of referenced file

    Hello, I've imported some pictures as referenced. Then I've changed one of those pictures with another program (just orientation) and my expectation was to see the change update as well in Aperture, but when I re-opened Aperture the thumbnail was still with the previous orientation as well as the image itself. Is this correct ? How can I update the informations in Aperture as soon as a referenced file is changed by an external program ?
    Many thanks.
    Davide

    Hi Davide.  Never.  That's just not how Aperture works.
    In fact, it works much better than that.  You do know that Aperture has extensive and robust image adjusting tools?  In many cases -- and certainly in the trivial case of changing an Image's orientation -- Aperture's adjustment tools are more than up to any job you throw at it.  In the cases where it is not, you can use plug-ins, or any external editor you have set Aperture to use.
    You should _never_ change, move, rename or in any way alter any Referenced Master file except using the controls within Aperture.  Doing so will almost certainly break the link between the Image (in Aperture) and the Master file, with crippling results.  Sometimes these breaks can be fixed.

  • How to Add logic to change quantity of child item(Template BOM).

    Now We use ver 2004B.
    2004B has bug about Sales Bom,The Bom can't be expanded correctly using UI-API.
    We have to using BOM Both UI-API and GUI,so we use Template Bom(in UI-API we expand the BOM by ourselves).
    Now we face two problems.
    1. In Template BOM,when change parents item's quantity,
    child item's quantity don't change.We must make UI-API logic to change child item's quantity,but we don't know which event should we catch.
    2. We have to add another logic,when expanded Template
    BOM (using GUI),setting zero price specific item.But don't know which event should we catch.
    Focus lost event may not use,because focus lost event triggers too much timing(for example,displaing a list of item,expanding BOM etc...).
    Please suggest us how to do.
    thank you.

    Hi Ibai Peña
    I tried logic which trrigerd Validate Event,but I face a
    new probrem.
    &#12539;When trrigerd Validate Event ,and add something value to other field, trriger Other Validate Event.
    To avoid this problem, I use a variable which type is bool using flug triggerd process.
    But I think this way is not so sensible, I want to take other way.
    thank you.

  • Dim. SCD2 issue, when parent value change. The child loses parent history.

    oracle DB: 10.2
    owb: 10.2.0.4
    Create a SCD2 type dimension with six levels in it. Alle levels have the same columns, see below (change the nr for the level)
    L1_KPL_PK
    L1_DATA_TILL
    L1_SLEUTEL
    L1_DESC
    L1_DATA_FROM
    L1
    When running the mapping, the hierachie is perfectly inserted into the table. When changing the
    value of the L1 parent in te source and running the mapping again the following
    is happend:
    He closed the parent record with the old value and insert a till date.
    He update alle child record with the new value
    He inserts a new record with the new value of the parent.
    What i should expect wat would happen was:
    He closed the parent record with the old value and insert a till date.
    He close alle child records with the old value and insert a till date.
    He inserts new records for all child with the new value of the parent.
    He inserts a new record with the new value of the parent.
    I searched on the net for this issue and i found oracle fixed it in a patch 10.2.04 The bug is know under nr 6004133
    "Child looses parent reference when SCD2 attribute change in parant.
    Installed the patch(7005587) and renewed my dimension, table, and mapping in the repository. Ran the mapping, but the result is not what i expexted as
    descriped above.
    Help needed to fix this issue. So alle histoy is beeing saved.

    Hi
    There was a change in OWB 10.2.0.3 (I think it was this patch) to support this scenario.
    If you go to the SCD settings panel for your dimension, each level also has the parent level's identifying column (this is the new bit) and you can set the Record History property for the parent identifier in order that a change in this will trigger history in the level (so the hierarchy can be versioned). So if you set this and synchronize the dimension operator in your map and redeploy the map, you should be in shape.
    So for example if you had L1, L2, L3 with attributes ID, NAME, ATT, EFF_DATE and EXP_DATE then the SCD panel would have;
    *L1
    ID
    NAME
    EFF_DATE eff date
    EXP_DATE exp date
    ATT trigger history
    *L2
    ID
    NAME
    EFF_DATE eff date
    EXP_DATE exp date
    ATT trigger history
    L1_ID trigger history
    *L3
    ID
    NAME
    EFF_DATE eff date
    EXP_DATE exp date
    ATT trigger history
    L2_ID trigger history
    Let me know if its unclear.
    Cheers
    David

  • Refreshing Parent Window on Close of Child Window

    I need to open a new popup window/tab using window.open method of javascript and on close of the new tab/popup window have to return some values from closing window to parent window. When I open a popup suing window.open in my asp .net application which is supposed to be compatible with iPad. Value has successfully been returned when I use IE, Chrome, FireFox and Safari (on PC with windows 7).
    Unfortunately the same code fails in Safari when I access the application through iPad. On iPad domObject is prompted on new window open instead of prompting returned value on new window close.
    Below is the code. Parent Window:
    Parent Window:
    <script type="text/javascript">
            function modalWin() {       
                    retVal = window.open('About.aspx', 'name', 'height=255,width=250,toolbar=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no ,modal=yes');
                    alert(retVal);
        </script>
    //HTML
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <a title="Test New Popup" onclick="modalWin();">New Popup for all browsers.</a>.
    </asp:Content>
    Popup window or new tab:
        <script type="text/javascript">
            function closeIt(tempValue) {
                window.returnValue = tempValue;
                window.close();
        </script>
    //HTML:
    <input id="btnButton1" value="btnButton1" type="button" title="Press it to Close" onclick="closeIt('btnButton1');" />
        <br />
        <input id="btnButton2" value="btnButton2" type="button" title="Press it to Close" onclick="closeIt('btnButton2');" />
        <br />
        <input id="btnButton3" value="btnButton3" type="button" title="Press it to Close" onclick="closeIt('btnButton3');" />

    HI for your reference
    am opening the new window by using
    <i><b>page navigation property</b></i> in that I am setting the
    Launch a new window  :   display in seperate window
    now if i close the main window ie potral screen i want the window which is opened through this also to be closed
    regards
    Abhijith YS

  • How create a replice "Mass Change for Quotation" from the "Mass..for order"

    Hello everybody,
    How create a replica "Mass Change for Quotation" UI object from the standard "Mass change for Sales Ordesr" UI object...
    Way: SAP CRM==>Select a business role "SPL-Service part Management" ==> Sales ==> "Mass Change Sales Orders"
    It needs a replica with the title "Mass Change for Quotation" .
    Could you pleas help?
    Mit freundlichen Gruessen / Kind regards,
    Pavel Biarozkin

    Hi Howard Brown,
    Thanks for your suggestions about Windows user experience. Actually, we are glad to hear more feedback
     about Windows operating system so that we can improve Windows to make it be more easier to
     use.
    As a suggestion for your current situation, you can use Windows Charm Bar to search Apps, it is also easy to use.
    Alex Zhao
    TechNet Community Support

  • Need to be enlightened on Parent, Child object assignments

    Hi!
    I am too boggled with parent class, child class objects assignments. For example say I have something like this:
    class parent{
       int a;
        void doStuff(){...}
    class child extends parent{
    int b;  
    void doOtherStuff(){...}
    }Ok. Now. if have have something like this:
    parent p;
    child c;Then which one of the below is legal and why and why not?
    1.) c = p;
    2.) p = c;
    I think p = c is legal. If so, can I do p.a =12; p.b=15;
    Why and why not?
    Please be my lifesaver.
    Thank You for reading!

    parent p;
    child c;
    If these are defined as global variables then both p and c will be null, meaning they refer nothing. Since a child inherits properties of the parent you can hold a child object using a parent reference
    so this is legal
    p = c;
    (Note: you need to understand the concept of a reference and object well. Here p and c are both references not objects).
    When you hold a child object using a parent's reference only parent's properties are visible. If you want to see the child's properties then you need to cast that reference to a child reference. So you can't say p.b=12.
    Hope you got what you want

  • How to Refresh JTree if a file System got changed during Run-time

    Hi,
    Can anyone tell me how to refresh a JTree(javax.swing.JTree) used for displaying file system(both local and remote).
    I'm getting a problem if a file/directoy is added to the file system, after my Applet is loaded. Actually, i have used DefaultTreeModel's reload() method for refreshing and calling it inside SwingUtilities.invokeLater() using Thread, but its not working.
    I want that the tree should reflect the latest Files/Directories on the click of a node, if any file or directory is added under that node.
    Plz tell me if this is possible or not.
    Thanks

    Hi Shay_te,
    Thanx for ur reply as i was eagerly waiting for the one.
    but the example is using the TreeTable
    and i have used JTree and DefaultTreeModel.
    I'm calling reload(node) within treeExpand() method
    Then, i'm regestring addTreeModelListener() as
    m_model.addTreeModelListener(new javax.swing.event. TreeModelListener(){ }
    inside which all 4 methods are over-ridden
    code snippet is as follows so plz help me and tell if this the right way:
    class DirExpansionListener implements TreeExpansionListener{
            DirExpansionListener(){
            public void treeExpanded(TreeExpansionEvent event) {
                final DefaultMutableTreeNode node = getTreeNode(event.getPath());
                final FileNode fnode = getFileNode(node);
                Thread runner = new Thread() {
                    public void run() {
                        if (fnode != null && fnode.expand(node)) {
                            Runnable runnable = new Runnable() {
                                public void run() {
                                    try{
                                       m_model.reload(node);
                                        m_model.addTreeModelListener(new javax.swing.event.TreeModelListener() {
                                            public void treeNodesChanged(javax.swing.event.TreeModelEvent evt) {
                                            public void treeStructureChanged(javax.swing.event.TreeModelEvent evt) {
                                                System.out.println("Path of node changed->"+evt.getTreePath());
                                            public void treeNodesInserted(javax.swing.event.TreeModelEvent evt) {
                                                System.out.println("Nodes Inserted method called..");
                                            public void treeNodesRemoved(javax.swing.event.TreeModelEvent evt) {
                                        System.out.println("Run inside DEvent called..");
                                        //Thread.sleep(500);
                                        //fnode.expand(node);
                                    }catch(Exception e){System.out.println("err :" +e);}
                            SwingUtilities.invokeLater(runnable);
                runner.start();
            public void treeCollapsed(TreeExpansionEvent event) {}
        Please reply...

  • I created a new collection and put all of my same photos in them as a previous collection, then I changed them to black and white and both collections changed. How do I keep the first collection colour and make the second collection black and white.

    I created a new collection and put all of my same photos in them as a previous collection, then I changed them to black and white and both collections changed. How do I keep the first collection colour and make the second collection black and white.

    For the second collection, choose the option to make virtual copies. Then you can turn the virtual copies to black & white, leaving the first collection in color. If you want file copies of the B & W images you can export copies.

  • How to update child record when item from parent record changes

    Hi, I have a master and detail form with two regions on the same page.
    Region one references parent record, one of column in the parent record is also in the child record. And is one to many relation
    between parent record and child record. How can I have the column on the child record updated when the column of the parent record is being modified?
    For exemple; Parent record has two columns : ID and Program.
    Child record has Program, goal# and status. I have two pages established, page 27 and page 28.
    Page 27 list out all programs from parent record, by clicking on edit to a program, it braches to page 28 with program listed as editable field in region one, and mulitple records list in region two from the child record with the same program.
    The problem that I am having is once the program in region one got modified using ApplyMRU, the program in child record did not get updated with the new value and therefore those record become orphan records. I need a way to update all current child records with the new program value.
    Thanks in advance for anyone who can hlep out on this problem.
    Julie
    Edited by: JulieHP on May 24, 2012 4:57 PM

    One Idea is
    If possible create a after update database trigger on the parent table to update the relevant child record.
    Next one
    Create a PL/SQL process on the parent page with process sequence next to ApplyMRU, so when the ApplyMRU is seccessfull it goes not to your process where you can have your update statement

  • How to refresh MessageChoice in advanced table on LOV change?

    I have an advanced table for data entry. One column has Employee Name, which is an LOV. Another column is a MessageChoice, listing eligible elements for that person. Everything works fine when the page is first loaded. This is the code I'm using in processRequest to set up the MessageChoice: The MessageChoice is set up using a PicklistViewDefinition (not instance) as each row has to have different selections.
    OAAdvancedTableBean table = (OAAdvancedTableBean)webBean.findChildRecursive("TimeEntryTbl");
    OAMessageChoiceBean elePoplist = (OAMessageChoiceBean)table.findChildRecursive("ElementSelect");
    elePoplist.setListVOBoundContainerColumn(0, table, "EmployeeGroupName");
    elePoplist.setListVOBoundContainerColumn(1, table, "PeriodEndDate");
    elePoplist.setListVOBoundContainerColumn(2, table, "AssignmentId");
    elePoplist.setPickListCacheEnabled(false);
    The problem is when a new row is added, initially the poplist will be empty, which is expected. After choosing a value from the Employee LOV, the AssignmentId (which is a FormValue) will be populated. At this point, I need the Poplist to refresh to get the correct list of elements. I'm not sure how to make the poplist refresh. In ProcessFormRequest, I have:
    if (pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getLovInputSourceId();
    System.out.print("lovsource=" + lovInputSourceId);
    And it prints the correct lov source. The dev guide says you can invoke an AM method there... but what should the AM do? I'm not sure how to refresh a poplist for a specific row when it is defined in an advanced table with Bound container columns, using a picklist view definition.

    I looked through that thread, but nothing in there seemed to really directly address my problem. The solutions in there seemed to be to make view instances instead of using the bound container columns.
    But, to answer my own question, I think I found the solution, which so far seems to be working ok...
    if (pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getLovInputSourceId();
    if ("PersonSelect".equals(lovInputSourceId))
    pageContext.setForwardURLToCurrentPage(null, // no parameters to pass
    true, // retain the AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    Which basically just refreshes the page so all the MessageChoice fields are re-populated based on the latest information in the row. No need to automatically re-execute any VOs and let's OAF do it's own thing to maintain them.

  • How to refresh the table after change value in the VO programatically?

    Hi,
    I like to update my table by using a popup. My problem is that the table does not refresh after I change the value in the table's VO by the popup.
    There is another table in the popup, and the popup is triggered by a command button. An af:showPopupBehavior is nested in the button. The method of the button in backing bean is as following,
    public void accountcodeButtonClicked(DialogEvent dialogEvnt) {
    ViewObject volisttable=am.getAcChartValidateView1();
    String nowcode=volisttable.getCurrentRow().getAttribute("Code").toString();
    ViewObject vobasetable=am.getGlDetailView1();
    vobasetable.getCurrentRow().setAttribute("AccountCode",nowcode);
    The partialTrigger of the base table's column AccountCode points to the triggering button.
    I do not know why the base does not refresh after the above method is executed.
    Please me.
    Stephen

    Hi,
    kind of a shame that after so many years of ADF the message that updates should be through the binding layer hasn't gone through ;-)
    You change the underlying business service, which doesn't impact the binding layer the way you do it. So here is what you can try in the same order
    - 1. RequestContext.getCurrentInstance().addPartialTarget(<table reference>)
    - 2. If 1. doesn't show the changed data, try and re-execute the iterator that is the base of the table. If this works then the effect you see is caused because you ignore using the binding layer
    Frank

  • Firefox always hangs. Spinning Beach Ball appears. Must Force Quit repeatedly. Have re-installed and refreshed with no change. How to fix?

    Every time firefox is launched, the spinning beach ball appears, sometimes immediately, sometimes within a minute or two, every time. Must force quit. I have re-installed Firefox and also have refreshed with no change. Unless this is fixed, Firefox is unusable. I am running OSX 10.9.5 on a 17" MacBook Pro.
    I cannot access any information through Firefox, because t always hangs.

    Could you test in Firefox's Safe Mode? That's a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: [[Troubleshoot Firefox issues using Safe Mode]].
    ''If Firefox is not running:'' Hold down the option key when starting Firefox.
    ''If Firefox is running:'' You can restart Firefox in Safe Mode using either:
    * "3-bar" menu button > "?" button > Restart with Add-ons Disabled
    * Help menu > Restart with Add-ons Disabled
    and OK the restart.
    ''Both scenarios:'' A small dialog should appear. Click "Start in Safe Mode" (''not'' Refresh).
    Any less crashy?

  • How to refresh the textedit object in module pool

    Hi All,
    I would appreciate if anybody can solve my problem.
    Problem is i have created one TEXTEDIT and now when user clicks on the cancel button and come back to the screen the data which was previously entered is still coming up.
    Please tell me how to refresh the data in TEXTEDIT.

    actualy it is enough to do the following, assuming you have a container to put the textedit into it:
      DATA:  l_parent_container TYPE REF TO cl_gui_custom_container,
             l_obj_editor TYPE REF TO cl_gui_textedit, "make this a global variable
             l_text_table TYPE re_t_textline,
             l_itftext TYPE STANDARD TABLE OF tline,
             l_thead TYPE thead.
    l_parent_container = ... "your container
    move .... to l_thead...    "your text header to read or reread
    read text from SO10
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          id                      = l_thead-tdid "Text-ID
          language                = l_thead-tdspras "im_request-language?
          name                    = l_thead-tdname "TDIC Text-Name
          object                  = l_thead-tdobject "Texte: Anwendungsobjekt
        TABLES
          lines                   = l_itftext
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    convert itf text to stream text (SAPSCRIPT_DEMO_NOTE_EDITOR)
      CALL FUNCTION 'CONVERT_ITF_TO_STREAM_TEXT'
        TABLES
          itf_text    = l_itftext
          text_stream = l_text_table.
      IF l_obj_editor IS INITIAL.
        CREATE OBJECT l_obj_editor
            EXPORTING parent = l_parent_container. " Abstract Container for GUI Controls
      ENDIF.
    discard any previous changes
      l_obj_editor->set_textmodified_status( cl_gui_textedit=>false ).
    übertragen text in editor
      CALL METHOD l_obj_editor->set_text_as_stream
        EXPORTING
          text            = l_text_table
        EXCEPTIONS
          error_dp        = 1
          error_dp_create = 2.

Maybe you are looking for