Hello,
For SmartGwt 6.0p , Chrome, Firefox, etc .
I have a multiple-select SelectItem working as-advertized, however I want to display the key of the valueMap (not the value) in the textBox that is part of the widget.
The value is long text, but the key is short text, and that's what we need to display in the box.
E.g.,
daysPickList = new SelectItem();
daysPickList.setTitle("Select Days");
daysPickList.setMultiple(true);
daysPickList.setMultipleAppearance(MultipleAppearance.PICKLIST);
daysPickList.setValueMap(daysValueMap);
daysPickList.setDefaultToFirstOption(true);
where daysValueMap =
daysValueMap = new LinkedHashMap<String, String>();
daysValueMap.put("All", "Select All Days");
daysValueMap.put("M", "Monday");
daysValueMap.put("T", "Tuesday");
daysValueMap.put("W", "Wednesday");
daysValueMap.put("TH", "Thursday");
What's the tonic to displaying the selected key in the textBox? (M,T,W...)
Thanks
-Tom
For SmartGwt 6.0p , Chrome, Firefox, etc .
I have a multiple-select SelectItem working as-advertized, however I want to display the key of the valueMap (not the value) in the textBox that is part of the widget.
The value is long text, but the key is short text, and that's what we need to display in the box.
E.g.,
daysPickList = new SelectItem();
daysPickList.setTitle("Select Days");
daysPickList.setMultiple(true);
daysPickList.setMultipleAppearance(MultipleAppearance.PICKLIST);
daysPickList.setValueMap(daysValueMap);
daysPickList.setDefaultToFirstOption(true);
where daysValueMap =
daysValueMap = new LinkedHashMap<String, String>();
daysValueMap.put("All", "Select All Days");
daysValueMap.put("M", "Monday");
daysValueMap.put("T", "Tuesday");
daysValueMap.put("W", "Wednesday");
daysValueMap.put("TH", "Thursday");
What's the tonic to displaying the selected key in the textBox? (M,T,W...)
Thanks
-Tom
Comment