Custom Field component | Vaadin components

This topic is the discussion thread for the Vaadin documentation page Custom Field component | Vaadin components.

Questions, feedback, and comments are welcome here.

The example component code example lacks one important feature: the components will not fire ValueChangeEvents, since they're not monitoring the value changes in the nested fields (DatePickers or the native ones). The solution is to add a value change listener to all internal fields, then call CustomField.updateValue()

You'd think that it should work that way (that you have to manually link the nested fields to the CustomField via value change listeners). But for me the change DOM events of the nested components trigger the updateValue() method of the CustomField. I'm not sure if this is intentional. And while it may be somewhat convenient in certain simpler cases, it takes away control and is currently biting me in the behind.

You're right! That looks really strange. Would be good to document this properly.

Here is a nice example implementation of CustomField for additional RichTextEditor features: v-herd.eu/tatulund-addons/rich-text