This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information

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

Frequently asked questions about VisionX.

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

Postby reversedr » Thu Jan 30, 2020 7:39 pm

Hi!

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

Thank You
reversedr
 
Posts: 35
Joined: Tue Oct 23, 2018 11:03 am

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

Postby Support@SIB » Fri Jan 31, 2020 2:34 pm

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.
User avatar
Support@SIB
 
Posts: 353
Joined: Mon Sep 28, 2009 1:56 pm

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

Postby nobrega » Mon May 24, 2021 9:30 pm

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
nobrega
 
Posts: 19
Joined: Tue Feb 11, 2020 6:40 pm

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

Postby nobrega » Tue May 25, 2021 11:35 am

Hi again,

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

Thanks.
nobrega
 
Posts: 19
Joined: Tue Feb 11, 2020 6:40 pm


Return to VisionX