> > Every editor knows the primitive fields it's editing. If the editor > implements HadEditorErrors.showErrors(), it can simply compare > primitiveField.asEditor() with error.getEditor() and highlight the erroneous > primitiveField. >
I've read through this at least half a dozen times, but I am not seeing how to pull this off in a good way. The approach of the ValueBoxEditorDecorator requires that the tags be wrapped (generally in the UiBinder xml itself rather than in java) for each and every element, and your proposal requires that the Editor instance which declares those private fields have either a collection of the editors it has in fields, or have a giant if/elseif/elseif to handle each one and check if it has the error, then do something to highlight, as you say. Is there any cleaner way to pull this off? What about (for example) looping through the editors in the showErrors() list, and checking if they extend Widget or implement IsWidget? How about other generic ways to refer to lots of Editor instances? Like in wiring up label/help icons, or something like that? I've thought about another binder/driver style marker interface, generic on the containing widget so the Generator could go through and build these if/elseif kinds of blocks, or deal with annotations on its own, but that means many of these interfaces and their GWT.create to kick them off - boilerplate that seems like it should be unnecessary. At best presently you can make a widget with a custom add method (and so custom tags) that would go through a custom dom setup process, but even those extra custom tags shouldn't be necessary, except we can't register new handlers for uibinder...... Anyone else thinking these kinds of thoughts with any more success than I? -Colin -- 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.
