0

Combobox with empty item

asked 2012-09-27 09:54:37 +0800

abb222222 gravatar image abb222222
30

Hi,

I want to make all combobox with an empty item as the first option. I tried several ways but still have not luck.
I overrided the Class Combobox and added an initialization block

{
Comboitem d = new Comboitem(nullLabel);
d.setValue(null);
appendChild(d);
}

It works only for non auto-binding type. Is there any way to add a default empty item in

<combobox id="providerCombobox" readonly="true"
model="@{composer.providers}" >

Anyone can share me a suggestion? Thanks!

Stephen

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2015-06-06 17:20:44 +0800

WilliamB gravatar image WilliamB
1609 1 6

updated 2015-06-06 17:23:05 +0800

I have the same issue. How can i allow the user to go back to blank choice in a combobox?

With the default component once he picked something he cannot go back to blank. I'm using an Enum value as my model so can't create a fake empty item.

I'm using MVVM

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2012-09-27 09:54:37 +0800

Seen: 79 times

Last updated: Jun 06 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More