I am new in SmartGWT and trying to select items of a SelectItem Widget programmatically. But didn't found a solution for that.
This is what I want:
This is my current code from the SmartGWT examples:
SelectItem selectMultiple = new SelectItem();
selectMultiple.setTitle("SelectItem: ");
selectMultiple.setMultiple(true);
selectMultiple.setMultipleAppearance(MultipleAppearance.PICKLIST);
selectMultiple.setValueMap("Cat", "Dog", "Giraffe", "Goat", "Marmoset", "Mouse");
How can I select Items programmatically? Found nothing about that.
Simply use SelectItem#setValues()
selectMultiple.setValues("Dog","Goat");