문제

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