How to work around 'read-only ComboBox hiding the input prompt' fix?

Vaadin 7.2.3 release removed input prompt from read-only or disabled ComboBox component (see
#10573
).

My team uses this “feature” (displaying input prompt in read-only mode) to show a default configuration value for our system. In fact, it is very convenient for us, as we can display a value without setting the component value. This fix prevents us from upgrading to the latest Vaadin release.

I noticed CSS style change (v-filterselect-prompt is not applied in read-only mode); a quick attempt at CSS manipulation did not yield the desired effect. I assume that setPromptingOn() sets the client widget text as well as changes the CSS.

Is there any workaround besides extending the default widget and overwriting the behavior (which I’d like to avoid).

Thanks in advance.

The changeset that is linked shows only code changes, no CSS changes. So, to replicate the old behaviour, you need to create your own ComboBox from an old version of the code. Sorry about that, sometimes these fixes break things when our users learn to use our bugs to their advantage :slight_smile:


http://dev.vaadin.com/changeset/823daef2b11ea29bfd3f556e954b2aa613ef56cb/vaadin

Many thanks for your reply.

For us it was actually a feature, as it allowed to display a value without setting the component value. That way users know what the value would be if they enter none and we would not bother saving anything as users did not enter anything.

In general UI users may want to know what kind of values those components allow without having write permissions or switching into “edit” mode. Could we suggest it as a read-only display feature? Because if we set the value ourselves we then cannot know if that was our doing or the users’.

Do we need to enter a feature request for this?

Thanks.

Yes, please do:
http://dev.vaadin.com

Submitted an enhancement request:
http://dev.vaadin.com/ticket/14676

Please let me know if any additional information is required. Thanks.