AbstractJavaScriptComponent can be a Field for a FieldGroup?

Ack, after spending time trying to port the CKEditor javascript library over as JavaScriptComponent, I just discovered that I cannot use it in a FIeldGroup because it doesn’t implement the Field interface. Attempting to implement the Field interface from scratch seems impractical. Is there any helper class that does this automagically for JS components?

Does this mean I need to implement CKEditor as a traditional Vaadin wdigetset after all? Or perhaps as an Extension to a Vaadin TextArea? If anybody has any experience, I’d love to hear it since spending so many days to get this to work as pure JavaScript and then realize it won’t integrate with other form fields is a disappointment. It surely will be less useful if done outside of that framework, requiring users of the component to do all of the get/set and commit/discard items directly on the editor.

Maybe you could make it a CustomField?

I replied to this question over in
this thread
but I think CustomField is probably a better solution. I wish I had found it before I implement my delegate Fields! I also wish Java would support mixins or delegates so this type of stuff wouldn’t be such an issue.

-mike

Thanks, Artur.

If I go this route, am I just building a traditional Vaadin+GWT-based widgetset then?

Or is there a bridge scheme for a CustomField to use my JavaScriptComponent, like do I just do MyCustomField.setContent(myJavaScriptComponent)?

Implement CustomField.initContent() to construct whatever component you want to use as the content - it can also be a JavaScript component.

This way, no need for a custom widgetset or GWT development because of the CustomField if its content does not require it.