Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top