Data binding and cutom field.

Hi, I have this requirement.

I want to have a component where there will be 1 select box and two DateFields. Simple CustomComponent is of no use because as far as I see it is only for laying out multiple components at once. I found the CustomField component could be of some use, but I’m lost. I don’t know how to proceed any further.

I have 3 properties so I don’t know how to correctly specify field in form. I don’t know how to add this bundled field to my BeanItem. Not sure if maybe I need to create my component to be Form or EmbeddedForm or not.

Can anybody give me some hints how to proceed when creating and mainly binding the CustomField with multiple properties to the Form.

Thanks beforehand.


The data API defines an field, to be bound to a Property (as a property editor), that is a single unit of information. In your case, will be better to have some kind of embbeded form.

I am not quite sure I understand your requirement, but I would suggest you to look first into this chapter.

If your requirement is to implement a component which has a bean as a data source you can extend a CustomComponent and use the BeanFieldGroup with a layout to achieve desired results.

If you requiere a special field in an existing form which will be a composit of some other fields try to use the CustomField: