Combobox - prevent the user from choosing the "null" value
4 posts
• Page 1 of 1
Combobox - prevent the user from choosing the "null" value
Hi!
In visionX on automatic generated comoboxes
how to prevent the user from choosing the "null" value ?
Thank You
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
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.
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.
-
Support@SIB - Posts: 353
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Combobox - prevent the user from choosing the "null" val
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
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
Hi again,
We found out we can get this behaviour if we set the nullable property of the respective column to false.
Thanks.
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
4 posts
• Page 1 of 1