3.2.0

AW.UI.List: Get Keys Instead Of Values

Given:

<script>
    var myList = new AW.UI.List;
    myList.setId( "myList" );
    //myList.setClass("text", "expand");
    myList.setSelectionMode( "multi" );
    myList.setItemText( myCommVals );
    myList.setItemValue( myCommKeys );
    myList.setItemCount( myCommVals.length );
    // onItemSelectedChanged fires twice; when value is true, 
    // then index is array index of chosen item
    var prevIdx = -1;
    myList.onSelectedItemsChanged = function(values) {
        alert( values );
    };
    document.write( myList );				
</script>


First, is setItemValue() a valid method on a List object like on a Combo object?

Second, how does one get the array of selected keys ( set via setItemValue() ) versus the values returned in onSelectedItemsChanged?

Thanks.
Paul Tiseo
May 11,

This topic is archived.

See also:


Back to support forum