Thomas is correct on both accounts. cellTable.setVisibleRangeAndClearData(cellTable.getVisibleRange(), true); will force a RangeChangeEvent to fire to the backend, but really your backend should be pushing the new data into the CellTable. For example, if you use ListDataProvider you can call ListDataProvider#refresh() to push the data back into the views.
John LaBanca
jlabanca@google.com
On Tue, Nov 2, 2010 at 12:49 PM, Thomas Broyer <t.broyer@gmail.com> wrote:
Maybe:
On 2 nov, 17:07, Geoffrey De Smet <ge0ffrey.s...@gmail.com> wrote:
> I 'd like to add a button to reload the CellTable when it's pushed,
> but I can only find:
> - cellTable.redraw(); // Doesn't reload the data from the backend
> - simplePager.firstPage(); // I don't want it to change the page
>
> Is there an easy way to do something like cellTable.reload() or
> cellTable.refresh() ?
cellTable.setVisibleRangeAndClearData(cellTable.getVisibleRange(),
true);
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/cellview/client/AbstractHasData.html#setVisibleRangeAndClearData(com.google.gwt.view.client.Range,
boolean)
But I think the expected use is to do it in your "model" rather than
the "view" (CellTable), where the "model" (or presenter, or whatever)
will fetch the data from the backend (maybe using getVisibleRange() to
filter it) and call setRowData() on the CellTable to update it.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment