質問

I have a SelectItem object which has a few items. I set a value MAP with:

organizations[0] = "A";
organizations[0] = "B";
selectItem.setValueMap(organizations);

When displayed, the combo box is showing "A" as selected item. Then, I need to programatically select value "B" and select this on the current SelectItem object. I've been looking all over the place with no avail.

Anyone?

役に立ちましたか?

解決

If you want any option of selectItem to be manually selected, then you should try following:

selectItem.setValue("B");

After doing this when you open the picklist of the selectItem, value "B" will be highlighted.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top