alejandro-du / crudui

Automatically generate CRUD-like Vaadin views for any Java Bean
https://vaadin.com/directory#!addon/crud-ui-add-on
Apache License 2.0
85 stars 54 forks source link

Dynamically change fields in FormFactory #120

Closed karakal closed 12 months ago

karakal commented 1 year ago

I have a Form that has two fields: filter and parameter: image Depending on the choosen value in the parameter combobox the filter field should be a textfield or a combox. I defined a FieldProvider that does that perfectly when I open a new form: image

I also implemented another fieldprovider, that has a ValueChangeListener on the parameter-combobox, to set some helper-text and it should also trigger the fieldprovider of the filter-field to change the filter field.

Is there a possibility to do this easily? For example to trigger the fieldprovider of the filter-field to replace the field already in the form?

alejandro-du commented 1 year ago

I think the best option here is to implement a custom field with all the components that you need.

alejandro-du commented 12 months ago

Closing this. If you still have the issue, please comment and provide more information or details.