Wednesday, June 25, 2014

How to listen a content changed event on a div/table using GWT?

I write a gwt client to append one row data on a specific table, 
but if the page display is part-updated with AJAX, the row I added disappears, how can I add a listener to catch the event of div updated?

public void onModuleLoad() {
    TableElement info_table =
        TableElement.as(Document.get().getElementById("key_Table"));
    String owner = "lora";

    if (info_table != null) {
      TableRowElement newR = info_table.insertRow(-1);
      newR.insertCell(0).setInnerHTML("<div>Owner</div>");
      newR.insertCell(1).setInnerHTML(
          "<div>" + owner + "</div>");
    }
  }

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment