Thursday, July 13, 2017

How to detect removed element in GWT

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.getParentElement();
          return (parentElement != null);

In my code, I got oneElement in one constructor. Later, when Application.hasParent() is called, it returns true although this element was removed by running Element.removeFromParent() in another Class. Aparently oneElement is orphan. In GWT, how do I detect orphan elements like oneElement.



You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment