Deleting a child..

In the manual, we can found :
quote:
The removeChild() and removeChildAt() methods do not delete a
display object instance entirely. They simply remove it from the
child list of the container. The instance can still be referenced
by another variable. (Use the delete operator to completely remove
an object.)
But you cannot delete an object (only a dynamic property..).
So how can we do it?

Welcome the the world of garbage collection. You must ensure
that there the child object is not referenced by any other object
and the Garbage collector will delete the object. This can be
tricky in Flex 2.0, but in Flex 3.0 you can use the profiler tools
to track references and ensure that objects are deleted.

Similar Messages

  • APP-PAY-07201 Cannot perform a delete when child record exists in future

    I am trying to put end date to a payment method of any employee in HR/Payroll 11.5.10.2
    but receiving the following error message:
    APP-PAY-07201 Cannot perform a delete when child record exists in future
    Can u advise what steps I should follow to resolve this issue.
    Regards /Ali

    This note is related to termination of employee while our employee is on payroll and just want to change is payment method. But in the presence of existing payment method we cannot attched another becuase we are receiving an error:
    APP-PAY-07041: Priority must be unique within an orgainzational payment method

  • How do I delete a child apple id from family sharing

    I have (please don't ask me how) doubled up my child's account under family sharing and need to delete one of them.  How do I delete a child apple id in family sharing?
    Any directions gratefully received.  You do not get the normal remove button that you get for an adult.

    Hello javyocks,
    Thanks for using Apple Support Communities.
    Concerning the issue with multiple Apple ID's, please look at the following:
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    Take care,
    Alex H.

  • How can i delete an child iCloud account created in error?

    I was setting up iCloud accounts for my two children today but mistakenly created an extra 'child' (for a non-existent 2 month old) account that i want to delete. How can i permanently delete a child iCloud account?

    You can't delete an iCloud account. You can sign-out, or remove the account from devices, computer or related services.

  • How to delete parent child relation in Toplink

    Hi All,
    I have 3 tables A,B,C.
    In Table A ,I am saving record.
    Table B & C has parent child relation.
    B-->Parent
    C-->Child
    So I want to save records in Table A.
    And delete from child(C) 1st then from parent(B).
    I m writing my code as,
    em.getTransaction().begin();
    em.persist(Table A);//save in Table A
    em.remove(em.merge(Table B));//Remove from Parent
    But how to delete records from child table then from parent table.
    Thanks
    Sandip

    If you have a @OneToOne relationship between two entities, the join column information is used to order the SQL when you remove two entities. For example, if I have:
    @Entity
    public class Employee implements Serializable {
         @OneToOne
         @JoinColumn(name="ADDR_ID")
         private Address address;
    ...Then the following code runs regardless of the order of the remove calls.
              em.getTransaction().begin();
              Employee parent = new Employee();
              Address child = new Address();
              parent.setAddress(child);
              em.persist(parent);
              em.persist(child);
              em.getTransaction().commit();
              em.getTransaction().begin();
              parent = em.merge(parent);
              child = em.merge(child);
              // order of next two statements unimportant
              em.remove(parent);
              em.remove(child);
              em.getTransaction().commit();If I don't remove the parent and just the child I get the same error you do because of the FK from Employee to Address.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Deletion of child records linked to parent records to be deleted etc..

    'Combined with WHEN OTHERS, SQLCODE provides a way for you to handle different, specific exceptions without having to use EXCEPTION_INIT pragma. In the next example, I trap two parent child exceptions, -2292 and -2291, and, then take an action appropriate to each situation:
    PROCEDURE delete_company (company_id_in IN NUMBER)
    IS
    BEGIN
    DELETE FROM company where company_id = company_id_in;
    EXCEPTION
    WHEN OTHERS THEN
    DECLARE
    error_code NUMBER := SQLCODE;
    error_msg VARCHAR2(512) := SQLERM;
    BEGIN
    IF error_code = -2292 THEN
    /*Child records found. Delete these too */
    DELETE FROM employee WHERE company_id = company_id_in;
    /* Now delete parent again */
    DELETE FROM company WHERE company_id = company_id_in;
    ELSIF error_code = -2291 THEN
    /* Parent key not found */
    DBMS_OUTPUT_PUT_LINE('Invalid company id' || TO_CHAR(company_id_in));
    ELSE
    /* This is like a WHEN OTHERS inside a WHEN OTHERS */
    DBMS_OUTPUT_PUT_LINE('Error deleting company, error: ' || error_msg
    END IF;
    END;
    END delete_company;
    Sourced from Oracle PL/SQL Programming (3rd edition) P.143
    1. Are error_code and error_msg assigned automatically or do I have to include assignments? If yes, how?
    2. Where do I get a list of commonly caught Oracle error codes and similar code snippets used for business logic?
    3. How would you deal with the situation where you detect a parent while you are deleting a child record? Just warn the user and log it hoping the DBA will review the logs?
    4. I work within a project where I could not query any parent-child relationships, using, amongst other queries the following query, and, this means that the programming team might not be creating these relationships within the database (Oracle 11g).
    What are the technical risks?
    Could I be omitting something, because it seems quite incredible to me that parent-child relationships are not in place?
    SELECT a.table_name,
    a.column_name,
    a.constraint_name,
    c.owner
    FROM ALL_CONS_COLUMNS A, ALL_CONSTRAINTS C
    where A.CONSTRAINT_NAME = C.CONSTRAINT_NAME
    and a.table_name=:TableName
    and C.CONSTRAINT_TYPE = 'R'
    Sourced from http://stackoverflow.com/questions/1729996/list-of-foreign-keys-and-the-tables-they-reference

    This is bad code, very very bad code. Throw it away and start with a clear idea of what you want to do.
    Why is this code very very bad? Because it uses WHEN OTHERS not followed by a RAISE.
    Why is this code bad code? Because it uses one WHEN clause instead of several.
    Here is an example for handling multiple exceptions:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/errors.htm#BABFBHGA
    If your error code does not have a predefined name, define the name yourself:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/errors.htm#BABIIEFC
    If you keep the WHEN OTHERS at the end, be sure to add RAISE so the exception still exists. If you don't, Oracle will not do the automatic rollback it should be doing.
    To answer your question about parent-child relationships, it is very important to have them. They stop you deleting a parent that has children, but they do not stop you from deleting children.

  • Why does RoboHelp 8 crash when compiling merged HTML help after deleting a child project in TOC

    Why does RoboHelp 8 crash when compiling merged HTML help after deleting a child project in TOC? I would be grateful for any assistance.
    Here's the situation:
    -- I recently upgraded from RoboHelp X5 to RoboHelp 8. I upgraded my projects to RoboHelp 8 projects.
    -- One large help system I manage is built such that there is one master project and about 25 child projects. Each of these is its own item in the master project TOC.
    -- In RoboHelp X5 I never had any trouble deleting these.
    -- However now in RoboHelp 8, whenever I delete one (by opening TOC pod, right-clicking on item in question, and clicking Delete), and proceed to "Generate Primary Layout" (MS HTML Help), the generation/compilation process proceeds as far as "Generating full-text search data" and then the whole program crashes!
    Am I doing something wrong? Is there a bug in the software? I have installed patches 8.0.1 and 8.0.2.
    Once again, I thank you in advance for any pointers.
    Matthew Keranen
    Jamsa, Finland

    That does help - thanks a lot.
    Wayne Kroger
    State Street Corporation
    SQA-Princeton
    (609) 580-6264
    mail to: [email protected]
    The information contained in this email and any attachments have been classified as limited access and/or privileged State Street information/communication and is intended solely for the use of the named addressee(s). If you are not an intended recipient or a person responsible for delivery to an intended recipient, please notify the author and destroy this email. Any unauthorized copying, disclosure, retention or distribution of the material in this email is strictly forbidden.

  • How can I delete a child's apple id?

    Im trying to delete my child's apple id because I accidentally put his birthday wrong and I cant change it

    Create a new ID, put your child's real age in this time.

  • How to delete the child record from the database

    how to delete a parent and child record from the database can we do it in the servlet and my database is oracle

    I'm not sure I understand the question but you could certainly use the JDBC API from within your servlet to access and modify a DB. You could also use an EJB layer to access your DB and accomplish the same tasks.

  • Facing problem while deleting a child record in hibernate.

    I am trying to update a child records i have following scenario
    master record (having one to many assciation with child table cascade=all in .hbm.xml configuration file) ===> customerInfo
    detail record set (having many to one assciation with master table cascade=all in .hbm.xml configuration file) ===> customerAccountsSet
    i do following steps to update a record
    1) get the customerInfo objetc from session successfully
    2) get the customerAccountsSet = customerInfo.getCustomerAccounts();
    3) traying to add a new customerAccount say customerAccount1 to be saved for the first time without primery key in it
    4) traying to update a customerAccount say customerAccount2 to be updated with primery key in it
    5) traying to add a delete customerAccount say customerAccount3 with primery key in it
    only step 5 is not executed properly as i can still see the deleted record in db , although save and update steps have been successfully completed in db.
    can anybody tell me whats going wrong here.code for steps 2,3,4,5 is as follows in the same order
    2)Set customerAccountSet = (Set) customerInfo.getCustomerAccounts();
    3)customerAccountSet.add(customerAccount);
    4)customerAccountSet.add(customerAccount);
    5)customerAccountSet.remove(customerAccount);

    Hi Nitesh,
    1) Java stack should be up while trying to connect to R/3 backend.
    2) You can check the JCOs by doing the following:
                           Type the following url   http://<server name>:<port number>
                           Click on Webdynpro Console
                           Enter the user name and password.(You need the system admin right on the EP to do the same)
                           You can find the JCOs.
    3) Better you contact the basis guy who had created the JCOs earlier and get the JCOs tested.
    Hope it helps.
    Regards.
    Rajat
    Edited by: Rajat Jain on Oct 12, 2009 1:47 PM

  • How to delete a child row

    hi, i want to delete a table (QUESTIONBNKMASTER )
    i've used delete QUESTIONBNKMASTER ; query for deleting but i got an exception saying that integrity constraint (VTSQBADMIN.FK_CHM_QNO) violated - child record.
    i tried for this command delete VTSQBADMIN.FK_CHM_QNO; but it say's table or view doesn't exits.
    what can i do to delete the table.
    my oracle username is vtsqbadmin.
    please reply soon it's a part of my assignment
    thanx in advance
    cinux

    You can do it many ways
    1. Delete all records from Child table then delete from master table.
    2. Remove the constraints using
    DROP CONSTRAINTS VTSQBADMIN.FK_CHM_QNO;
    and then delete records from master table.
    3. Disable the constraints. and then delete records from master table.
    Regards
    Re

  • ADF Tree setting focus back to parent node after deletion of child node

    Hi,
    Is there a way to get the focus back to the parent node (or rather any particular node) in a tree?
    I have a use case where we need to get the focus back to the parent node after a child node is deleted.
    Currently the focus is shifted to the next node in the tree, but the need is to get the focus shifted back to the parent node. Also the parent node should be re-invoked to populate to get the latest status after deletion of the child node.
    Any help/pointers?
    Thanks

    Thanks for the reply Frank.
    I saw the link http://sreevardhanadf.blogspot.in/2012/07/showing-next-row-as-current-row-after.html
    However the issue is since I am using custom created tree using POJO tree item (composite object).
    calling myTree.getWrappedData() doesn't gives me a handle to JUCtrlHierBinding and subsequent access to JUCtrlHierNodeBinding.
    my program gives me data like -
    List<MyTreeItem> treeData = (List<MyTreeItem>)treeModel.getWrappedData();
    because my tree model is build using -
    treeModel = new ChildPropertyTreeModel(items, "children");
    where items is List of <MyTreeItem>
    Hence I am unable to get a handle using -
    List nodeParentList = nodeParent .getKeyPath();
    I am programmatically able to invoke the parent node to get the fresh data, only issue is the focus/selection of that node is not happening
    Is there a way around?
    Thanks
    Sachin

  • Help on creating and deleting xml child elements using Toplink please.

    Hi there,
    I am trying to build a toplink xml demo illustrating toplink acting as the layer between my java code and an xml datasource.
    After pulling my custom schema into toplink and following the steps in http://www.oracle.com/technology/products/ias/toplink/preview/10.1.3dp3/howto/jaxb/index.htm related to
    Click on Mapping Workbench Project...Click on From XML Schema (JAXB)...
    I am able to set up java code which can run get and sets against my xml datasource. However, I want to also be able create and delete elements within the xml data for child elements.
    i.e. in a simple scenario I have a xsd for departments which has an unbounded element of type employee. How does toplink allow me to add and or remove employees in a department on the marshalled xml data source? Only gets and sets for the elements seem accessible.
    In my experience with database schema based toplink demos I have seen methods such as:
    public void setEmployeesCollection(Collection EmployeesCollection) {
         this.employeesCollection = employeesCollection;
    Is this functionality available for xml backended toplink projects?
    cheers
    Nick

    Hi Nick,
    Below I'll give an example of using the generated JAXB object model to remove and add a new node. The available APIs are defined in the JAXB spec. TopLink also supports mapping your own objects to XML, your own objects could contain more convenient APIs for adding or removing collection members
    Example Schema
    The following XML Schema will be used to generate a JAXB model.
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
         elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="department">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="employee" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:element name="employee">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="name" type="xs:string"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>---
    Example Input
    The following document will be used as input. For the purpose of this example this XML document is saved in a file called "employee-data.xml".
    <department>
         <employee>
              <name>Anne</name>
         </employee>
         <employee>
              <name>Bob</name>
         </employee>
    </department>---
    Example Code
    The following code demonstrates how to use the JAXB APIs to remove the object representing the first employee node, and to add a new Employee (with name = "Carol").
    JAXBContext jaxbContext = JAXBContext.newInstance("your_context_path");
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    File file = new File("employee-data.xml");
    Department department = (Department) unmarshaller.unmarshal(file);
    // Remove the first employee in the list
    department.getEmployee().remove(0);
    // Add a new employee
    ObjectFactory objectFactory = new ObjectFactory();
    Employee newEmployee = objectFactory.createEmployee();
    newEmployee.setName("Carol");
    department.getEmployee().add(newEmployee);
    Marshaller marshaller = jaxbContext.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
    marshaller.marshal(department, System.out);---
    Example Output
    The following is the result of running the example code.
    <department>
         <employee>
              <name>Bob</name>
         </employee>
         <employee>
              <name>Carol</name>
         </employee>
    </department>

  • How to delete particular child element

    hi
    i have one xml document like this;how to delete particular element ;i want to delete say playerid = 9;
    and also i want to update the particular element, IndianPlayer(child nodes(name,age)) say playerid = 5 with name=agarkar and age=27;
    <India>
    <IndianPlayer PlayerId="1">
    <Name>Sachin</Name>
    <Age>31</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="2">
    <Name>Saurav</Name>
    <Age>32</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="3">
    <Name>Yuvraj</Name>
    <Age>22</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="4">
    <Name>Dravid</Name>
    <Age>32</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="5">
    <Name>Kumble</Name>
    <Age>34</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="6">
    <Name>Sehwag</Name>
    <Age>24</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="7">
    <Name>Laxman</Name>
    <Age>32</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="8">
    <Name>parthiv</Name>
    <Age>18</Age>
    </IndianPlayer>
    <IndianPlayer PlayerId="9">
    <Name>Zaheerkhan</Name>
    <Age>26</Age>
    </IndianPlayer>
    </India>
    bye
    chaitanya

    Hi
    you can use the following code to delete a particular child based upon the given criteria
    Name the xml file as cricPlayer.xml(since i have used that name in the program)
    i hope this solves ur problem
    // Developed by ottran on 18/06/2004
    import java.io.*;
    import java.util.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.*;
    import javax.xml.parsers.*;
    import javax.xml.*;
    import javax.xml.transform.stream.StreamSource;
    public class CricDom
    public static void saveXML(Document doc, String str)
    try{
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.setOutputProperty(OutputKeys.INDENT,"yes");
    transformer.transform(new DOMSource(doc),new StreamResult(str));
    catch(TransformerException e)
    System.out.println("Transformer Exception: "+e);
    public static void main(String args[]){
    try
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse("cricPlayer.xml");
    document.getDocumentElement().normalize();
    Node ParentNode = document.getDocumentElement();
    NodeList list = document.getElementsByTagName("IndianPlayer");
    for(Node child= ParentNode.getFirstChild(); child != null; child = child.getNextSibling())
    try{
    if(child.getNodeType()==Node.ELEMENT_NODE)
    NamedNodeMap tw = child.getAttributes();
    if(child.getAttributes().getNamedItem("PlayerId").getNodeValue().matches("9"))
    ParentNode.removeChild(child);
    saveXML(document,"cricPlayer.xml");
    catch (NullPointerException nex)
    System.out.println("Null Exception : "+nex);
    catch (Exception ex)
    System.out.println("Exception : "+ex);
    Bye
    ottran

  • Id deleted in child system

    Hi Gurus
    A user id has been deleted in cua child system . Is there any way to trace who deleted the user id ?
    Change document shows its deleted by CUA_ADMIN , but we cant trace the original id with which the user has been deleted . Please help!!!!!

    You have to check it in the CUA (domain) not in the chid system..... always in the child system is going to appear the RFC user used to distribute the changes from CUA.
    SU01 - enter user - Go to >Information>Change documents for users
    Regards,
    Marco

Maybe you are looking for

  • Error:Crystal report Print option in xeon processor

    i am using a server with windows 2008 server and xeon 5520 series processor. windows in 64 bit with 16 Gb of ram. everything is working fine except the print option in crystal report.. i tried installing crystal report basic runtime but it says that

  • What's the right way to add a swipe handler to a DataGrid?

    H All: What's the right way to add a swipe handler to a DataGrid? (Target = Android, AIR using Flash IDE) Adding a handler to the DataGrid works; but (as expected) it only works on  the datagrid itself. Like if you swipe on the background before rows

  • Can't delete newly added row in inner advanced table

    Hi! Im using advanced in advanced table and i can't delete a row after i added in detail table, i have to refresh the page in order to delete the row. This is what i do. execute query from master table expand row in master table click Add row button

  • Weather Widget bug: doesn't display full city name initially

    I have a brand-new Mac Mini. The weather widget is configured incorrectly if you go through the default set-up process for Philadelphia. I went through the standard Mac OS X first-time setup, telling it my location (Philadelphia, USA). This pre-confi

  • Windows 2012 RDS on hyperV - DNS issue

    Strange issue, whilst fiddeling arround with some certificates on the connection broker and eventualy rolling back the snapshot I was unable to contact my RD session host. When I try to connect through RD Web Access it gives me an untrusted certifica