Page 1 of 1

Combobox - prevent the user from choosing the "null" value

PostPosted: Thu Jan 30, 2020 7:39 pm
by reversedr
Hi!

In visionX on automatic generated comoboxes
how to prevent the user from choosing the "null" value ?

Thank You

Re: Combobox - prevent the user from choosing the "null" val

PostPosted: Fri Jan 31, 2020 2:34 pm
by Support@SIB
You mean that you have an empty value in the web/vaadin UI in your browser?
This is not the case if you're using the desktop version of your application!

It's a known limitation of the web UI in current UI implementation. We'll solve this problem in newer versions of vaadin UI and sure, next VisionX release will contain the changes automatically.

Right now, the only solution is that you add a value change listener to the datarow and check if the value is null. If this is the case use DataBookUtil.setValue to change the value back... The DataBookUtil takes care of link cell editors and will set all referenced column values not only the visible value.

Re: Combobox - prevent the user from choosing the "null" val

PostPosted: Mon May 24, 2021 9:30 pm
by nobrega
Hi,

Can you please confirm that this feature is not yet available on visionx 5.6?

This issue seem to be related to vaadin setNullSelectionAllowed(false) and/or setNullSelectionItemId(Object nullSelectionItemId) which for some reason seem to not be available in the vaadin version visionx is using.

Thank you,
danobrega

Re: Combobox - prevent the user from choosing the "null" val

PostPosted: Tue May 25, 2021 11:35 am
by nobrega
Hi again,

We found out we can get this behaviour if we set the nullable property of the respective column to false.

Thanks.