Unable to force Select entry

I’ve loaded a Select object with a list of entries from a database table. At some point, the user takes an action on a table that causes me to want to set the value of the selector. I have the id of the object, but the select() statement does not seem to do anything. Here is the code:

private Select sel_BusinessUnit = new Select(“Business Unit”);



sel_BusinessUnit.setContainerDataSource(app.getDbMgr().getSqc_BUNames());
sel_BusinessUnit.setItemCaptionMode(Select.ITEM_CAPTION_MODE_PROPERTY);
sel_BusinessUnit.setItemCaptionPropertyId(“buname”);
sel_BusinessUnit.setImmediate(true);



private void setForm(Object buId){
Logger.info(“Set Form: BUID: " + buId + " Name: " + buName);
sel_BusinessUnit.select(buId); // ***** Tried each of these statements without success…
// sel_BusinessUnit.setValue(buId); // ***** this doesn’t work either…
Logger.info(”\tIsSelected: " + sel_BusinessUnit.isSelected(buId));
Logger.info("\tSelected : " + sel_BusinessUnit.getValue());
}

Log file output is:

Set Form: BUID: 3 Name: ABCDE *** This is correct
IsSelected: false *** ???
Selected : null

How do I set the value of a selector object?

The selector itself is fine - I can pull down the list of BU Names, and if I do that, my valueChangeEvent shows that in fact the correct name is selected. But it won’t let me set the selection programmatically…

thanks,

nbc