Binder, read bean, changing two bean properties. Is it possible

I have a business situation when ComboBox binded to binder should change two properties in main binded bean. Combobox contains value for binded property and another value for other property. Is there a simple way to achieve that. So, on valueChange, there should be another extra property set and shown in binded field.

It’s hard to explain. Will try to articulate better.

You should probably change the value of the other field, not the value in the bean since the binder is not a 2 ways binder

And in the addValueChange of the fields you should use event.isFromClient to avoid infinite loops.

What about calling setbean again?

In your title, there is read bean. You shouldn’t mix readBean and setBean. Which one are you using?

I would switch logic to setbean if needed

But i relly like haschanges when using readbean

You can probably change the value of the bean then call setBean again. I don’t know if I tried it, it seems wrong to me (Your initial idea is to calculate automatically a value of a field. So setBean is far from the original idea)

MY fields are dynamically generated so I should than create some kind of form field registry.

My solution was to create custom valueSetter for the field.