I don't think CellTable's editing abilities are meant to be used with the 
Editor framework. The Editor framework is based on a Flow 
Synchronization<http://martinfowler.com/eaaDev/FlowSynchronization.html>pattern 
while CellTable generally directly edits its value. To be able to 
edit objects in a CellTable "bound" through the Editor framework, you'd have 
to provide your own EditorSource to a ListEditor (i.e. do not use 
HasDataEditor, but rather somehow duplicate it) with subeditors for the 
fields you'll edit (you can use SimpleEditors), and have your CellTable 
extract its data from those subeditors, and push updates into them too. This 
would be so that the actual object being edited is only modified when you 
later flush() your EditorDriver.
This is only *in theory* though, I haven't tried it.

Note that adding and removing items from the list is a different story, as 
the list you get from the ListEditor/HasDataEditor is already a "working 
copy" of the one passed to the editor.
This I experimented with, in two fashions depending on the constraints:

   - simply modify the list, as it would be persisted with the whole object 
   being edited (or with a service call passing the edited list as an 
   argument);
   - queue add and remove service calls to our RequestContext, that we'll 
   fire later on (after we flush the EditorDriver to persist changes made in 
   other non-list editors)

Because we do not edit the list items' properties, we were able to use the 
HasDataEditor (with a CellList in our case, but you could use a CellTable 
equally well)

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to