Hi,
this is probably a dumb question; but I'm wondering how to do this.
I have a form with a ComboBoxItem which is supposed to display a list of accounts. The contents of the ComboBoxItem is based on a DataSource (via .setOptionDataSource) and the datasource is backed by Spring/Hibernate via DMI.
All this works fine; however the ComboBoxItem is part of a search form. What I would like to do is add an "All" value to the ComboBoxItem; in addition to what it's getting back from the datasource (this allows users to NOT filter the search by account, basically).
I know that I can set the DefaultValue of the ComboBoxItem by calling ComboBoxItem.setDefaultValue("All"); however, as soon as a user picks some other value, "All" disappears from the list and there's no way to set the ComboBoxItem back to it's starting value.
So, how do you add a permantent option to a ComboBoxItem (or SelectItem or whatever) that's not part of the original DataSource?
this is probably a dumb question; but I'm wondering how to do this.
I have a form with a ComboBoxItem which is supposed to display a list of accounts. The contents of the ComboBoxItem is based on a DataSource (via .setOptionDataSource) and the datasource is backed by Spring/Hibernate via DMI.
All this works fine; however the ComboBoxItem is part of a search form. What I would like to do is add an "All" value to the ComboBoxItem; in addition to what it's getting back from the datasource (this allows users to NOT filter the search by account, basically).
I know that I can set the DefaultValue of the ComboBoxItem by calling ComboBoxItem.setDefaultValue("All"); however, as soon as a user picks some other value, "All" disappears from the list and there's no way to set the ComboBoxItem back to it's starting value.
So, how do you add a permantent option to a ComboBoxItem (or SelectItem or whatever) that's not part of the original DataSource?
Comment