Tuesday, September 4, 2012

Re: Issue with flush when implementing a NullableSetEditor by wrapping a NullalbleListEditor



On Tuesday, September 4, 2012 5:49:01 PM UTC+2, Jeff wrote:
Hi Thomas,

In the original post, I forgot to mention that, I tried the following flush() implementation but it didn't make a difference:
@Override public void flush() {wrappedEditor.asEditor().flush();}


I am not sure what else I can do within flush() since the only member variable of the class is the wrappedEditor.

Thanks!


OK, looking a bit more in details, I really think you should follow the same pattern as OptionalFieldEditor (as I already told you on StackOverflow), with setValue() transforming the Set into a List and calling chain.attach(theList, theListEditor), and getValue() calling chain.getValue(theListEditor) and transforming the List back to a String.
Not tested but it has more chances to work than your strategy of "hiding" the underlying ListEditor.

--
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/-/sBaLVnD-k-cJ.
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