How to detect removed element in GWT

2017-07-13 Thread David
In my application, I have such following code: public class Application { private Element oneElement = null; public Application(Document document) { oneElement = document.getElementById("org"); } public boolean hasParent() { Element parentElement = oneElement

Re: How to detect removed element in GWT

2017-07-13 Thread Jens
AFAICT this should have worked. Given that Elements in GWT are pretty close to the real JS API I don't see a reason why this should not work. Maybe you have a bug somewhere in your code? Are you sure that other class removes the correct element? In pure JS it works https://jsfiddle.net/08sh6nh

Re: How to detect removed element in GWT

2017-07-13 Thread Michael Joyner
Might require a deferred op. I have done stuff with add/removing and it seems to work best to do the op then continue everything else in a deferred. On 07/13/2017 04:14 PM, Jens wrote: AFAICT this should have worked. Given that Elements i

Re: How to detect removed element in GWT

2017-07-13 Thread Michael Joyner
On 07/13/2017 04:14 PM, Jens wrote: AFAICT this should have worked. Given that Elements in GWT are pretty close to the real JS API I don't see a reason why this should not work. Maybe you have a bug somewhere in your code? Are you su