I tried out your suggestion, and while I think it works, it seems that something else is just as easy.
I had previously configured it to work as a combo box.
DataSourceTextField wed_field = new DataSourceTextField("wednesday","Wednesday");
wed_field.setValueMap("TB","IR", "NP");
ds.addField(wed_field);
The above code was done when creating the data source. It provides a combo box for the wed_field with the options TB, IR, and NP.
However, if I simply add
wed_field.setMultiple(true);
Then it becomes a box where I can select multiple items. However, it definitely doesn’t look as pretty since it is just a white box in it with selected items highlighted.
So I tried out your method from scratch, and the SelectItem method seems to have the same result. Should there be any difference?
One thing that makes me wonder is I did not notice any animation for the SelectItem list even though I had setAnimatePickList(true) and setAnimationTime(1000) set. So perhaps I did not create the SelectItem version correctly.
Either way, the two versions I had (trying through SelectItem or simply taking a combobox grid item as created in the showcase examples and calling DataSourceTextField.setMultiple(true)) did not seem very pretty unfortunately, although they would work.
Furthermore, it was not as user-friendly, as I had to control click or shift click to select multiple items, which isn’t as intuitive. I do not expect the users of this software to be very good with computers so having to mix in control clicks and shift clicks makes things more difficult (vs. a collection of checkboxes, where they just click the ones they want - but I have yet to figure out how to do this in a grid.)