modern UI - change widget value only if condition met

Hi,

I try to implement a widget_1 which will change its value only if another widget_2 is set to a specific value. otherwise I would like to let the value of widget_1 untouched. I tried to use a @ValueProvider (computeFromValueSupplier(...)) for widget_1 using a @ValueReference of widget_2 but I don’t know how to avoid a value change if my condition is not met. I don’t know how to retrieve the current value of widget_1.
I assume it’s possible to get such a behavior and I would be happy if anybody could help me.

Antje

Hi @niederle,

if you did not already get it working, I think what you need is to simply throw a StateComputationFailureException in the computeState method if you don’t want to update the value. I don’t know which version you are developing against, since the API is still evolving… That’s it’s name at least in the current nightly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.