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.
Thanks, John LaBanca [email protected] On Tue, Nov 2, 2010 at 12:49 PM, Thomas Broyer <[email protected]> wrote: > > > On 2 nov, 17:07, Geoffrey De Smet <[email protected]> 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() ? > > Maybe: > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
