Wednesday, September 28, 2011

Re: Is it possible to flush the sub-editor of a CompositeEditor ?

Hi Thomas,
  You are right that the ListEditor (or HasDataEditor) is the behavior I wanted to use, but my Proxies at the time were related with a Set<> interface based on the server-side requirements.  Essentially what I did was re-write the ListEditor as a SetEditor.  

  Recently we had to change our Sets to Lists anyway, so I can go back and re-visit that decision.  

A slightly better description of the problem is, consider ParentObjProxy { List<ChildObjProxy> children; }
When editing ParentObjProxy in its editor, the user should also be able to add/delete/edit the ChildObjProxys in the children relationship.
In the ParentObjProxy edit page, the children are displayed in a CellTable. 
When the user selects a row in the CellTable and clicks an edit button, a dialog is shown containing an editor for the ChildObjProxy.
The user then modifies the fields in the ChildObjProxy editor, and closes the dialog.
At this point, we would like the CellTable in the ParentObjProxyEditor to display the newly modified values.  However, the call to chain.getValue(ChildObjProxy instance's editor) that should show the values from the editor is still showing the old values, because the child editor has not been flushed yet.

What I'm trying to do is really no different than the WorkgroupEditor example at http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/com/google/gwt/editor/client/CompositeEditor.html , with the only difference that I'd also like to be able to read the current values of the "Person"s from the PersonSummaryEditors and display them in a table.

I will try tomorrow converting it back to a ListEditor and see if that helps at all.  At the very least it should remove some of my boilerplate code.

Thanks,
Eric

--
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/-/C93vsH1elAUJ.
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