3.0 beta 2

Add To AW.UI.List

Is there a quick way to add item(s) to the List control that I can't seem to find? Or, do I have to add to the Javascript array and call a refresh on the List object?

Here's the sample code. I need to modify a list (creatively called myList) in line 17-19:

var groupAdd = new AW.UI.Button();
groupAdd.setControlText("Add An Empty Group");
// button click action
groupAdd.onControlClicked = function(event) {
    if ( isExtAlphaNumeric(document.getElementById("groupName").value) ) {
        var r = new AW.HTTP.Request;
        r.setParameter("GName", document.getElementById("groupName").value );
        r.response = function( data ) {
            if ( data != "SUCCESS" ) {
                alert( data + " Group was not added." );
            else {
                // modify list here

Paul Tiseo
April 20,

currently there is no add/deleteItem methods for the list controls. You have to modify the data array and then refresh the full list.
Alex (ActiveWidgets)
April 20,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.