Hi all,
I am using select component in my aplication as follows:
<t:select t:id="mayAttributeValueSelect" value="attributeValues"
model="multiValuedAttributeSelectModel" size="5" style="width: 150px"
multiple="true"/>
But, even though my model doesn't contain any options, it renders as
follows:
<select style="width: 150px;" multiple="true" size="5"
id="mayAttributeValueSelect_0" name="mayAttributeValueSelect_0">
<option value=""></option> <!--This option is not supposed to be here-->
</select>
Following is my select model:
public class ListSelectModel extends AbstractSelectModel {
private List<OptionModel> options;
public ListSelectModel(List<String> optionList) {
options = new ArrayList<OptionModel>();
for (String s: optionList) {
options.add(new OptionModelImpl(s, s));
}
}
@Override
public List<OptionGroupModel> getOptionGroups() {
return null;
}
@Override
public List<OptionModel> getOptions() {
return options;
}
}
Am I missing something here?
Thanks....