> I actually just switched to using ListDataProvider instead of just calling
> setData() every time something is removed or added. I was basically
> reloading the presenter every time something changed. So my understand is
> that with ListDataProvider I only have to remove the item from the list and
> then it can update the CellTable automatically. Is that right?
I think you will need to get the list from ListDataProvider, remove
the item, and set ListDataProvider with the new list. I believe it
should update automatically from there. I think they suggest doing
rowcount and visible range.
The problem I have is that I am deleting a blob from the blobstore, not just removing it from the table, so once the RPC call returns it seems the best way is to reload the presenter using History.fireCurrentHistoryState() which makes the app query the DS again, and fill the table from scratch. It's only me that will be using this delete function, users will just be able to download so it's not a major problem in terms of efficiency.
I'm having a weird problem though - sometimes the RPC call returns successful after a delete and then when I reload the presenter it still gets the list including the file I just deleted. A refresh always sorts it out though - maybe a memcache problem or something? I am using Objectify so not sure if that may affect it.
Drew
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/KI2Dk0O-hDkJ.
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