Reviewers: bobv, rjrjr, jlabanca,

Description:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5599

Bob suggested that "It should check to see if the size of the exported
list has changed whenever create() or dispose() is called."
(https://groups.google.com/d/msg/google-web-toolkit-contributors/HZgU8TQ23YI/18zUwzXY-PgJ)
but given the kind of things it's already doing wrt HasData (e.g. if you
remove the first element in the exported list, the HasData rows are
refresh using one call to setRowData for each row) and how
AbstractHasData tries to defer as much as possible to the "finally
block", I went with a simple fix that decrements the "row count" for
each call to HasDataEditorSource#dispose. This means that when you edit
a new list, setRowCount+getRowCount are called once for each item from
the previously edited list, before setRowData is called for each item
from the newly edited list. I don't really know what it means wrt
performance (and that's why I'm adding John as a reviewer) but at least
it works.

Please review this at http://gwt-code-reviews.appspot.com/1297801/show

Affected files:
  user/src/com/google/gwt/editor/client/adapters/HasDataEditor.java
  user/test/com/google/gwt/editor/EditorSuite.java
  user/test/com/google/gwt/editor/client/adapters/HasDataEditorTest.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to