Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top