V8 dynamic validations

Hi, plz what is the recommended way to add/remove validations from bindings after they have been created?

com.vaadin.data.Binder.BindingImpl#converterValidatorChain is private and quite complex

com.vaadin.data.HasValue#getDefaultValidator is hard coded

this makes some promise about not needing the binders for validations, anyway I guess it disappears in future vaadin versions

Anywaym, these are “hacks” that require modifying vaadin source code, what is the standard way?

If you store a reference to the binding, you can later call binding.remove() if I remember correctly

Hi, the question is about adding/removing validations from binding

(alternatively i will do validations without bindings, but i am really curious what is the right way to modidfy validaions on binding in V8 :neutral_face: )

(these topics are very related, unfortunately it seems that we will need to implement it ourselves :neutral_face: https://vaadin.com/forum/thread/15426235/vaadin8-field-validation-without-binders)

You can not change the validations on a binding - you have to redo the binding

That is really a change from V7 …

Positive thinking: it stays the same from V8 to V24+

We have a complex hierarchical gui with bound tree like object structure and dybamically created validations, so right now I am not very optimistic

We would have to make binders from the whole tree available to event handlers, not sure how to do that right now

Also the object are bound by reflection, not manually

I am going to try valdiations without bindings I guess there are two ways: a) com.vaadin.data.HasValue#getDefaultValidator which is not supported inm later vaadin versions b) override valuechanged event https://discord.com/channels/732335336448852018/1034407422980280332/1034411194943012884

hm, maybe i wil lhave also look at re-creating the bindings


need to leave now, have a nice day