Hi,
you could use this function to get the selected label (id is the component id of the combo box):
function getSelectedLabel( id ) {
var ComboBox = getComponent( id );
var value = ComboBox.value;
var ChildrenList:java.util.ListIterator;
ChildrenList = ComboBox.getChildren().listIterator();
while (ChildrenList.hasNext()) {
var Child = ChildrenList.next();
/*** process computed / multiple values ***/
if( typeof( Child ) == 'com.ibm.xsp.component.UISelectItemsEx' ){
var hlp = Child.getValue();
for( var i=0; i< hlp.length; i++ ){
if( hlp[i].getValue() == value )
return hlp[i].getLabel() ;
}
}
/*** process single values ***/
if( typeof( Child ) == 'com.ibm.xsp.component.UISelectItemEx' ){
if( Child.getItemValue() == value )
return Child.getItemLabel();
}
}
}
Hope this helps
Sven