Re: Removing a node??
"Ming Peng" <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,Kirk You should use "removeChild(removeReportButton)"---the method of Node. If you just set it to null,it will not work as you wish.The "removeReportButton" is just a reference to an address of the memory.If you set it to null,you just make the "removeReportButton" refer to "null".The content which the "removeReportButton" previously referred to,is still there.It still the child of your document and your document still take it one of his children. In a nutshell,you do not konw somebody named "Jack" but someone else konw him.:) >From: Kirk Daries <[email protected]> >Reply-To: [email protected] >To: [email protected] >Subject: [Barracuda] Removing a node?? >Date: Mon, 7 Jul 2003 16:48:21 +0200 > >Hi Guys, > >Quick question? > >How does one remove a node from a xmlc document? >I thought is was a simple mater of setting it to null...? >But that doesn't seem to work... > >E.g. > > public void processButtonNodes(HTMLObject xmlcPage, String pageEvent) { > this.reportButton = (HTMLButtonElement) >xmlcPage.getElementById("reportPage"); > > if (this.removeReportButton == true) { > if (this.reportButton != null) { > this.reportButton = null; // Doesn't seemt to work? > System.out.println("Setting reportButton to null."); > } else { > System.out.println("Node not found!!"); > } > } > > super.processButtonNodes(xmlcPage, pageEvent); > } > > >Can someone clue me in? > >Thanx >KD >_______________________________________________ >Barracuda mailing list >[email protected] >http://barracudamvc.org/lists/listinfo/barracuda _________________________________________________________________ 璐逛杞 MSN Explorer: http://explorer.msn.com/lccn/