:: Forum >>

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
Thursday, April 20, 2006

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)
Thursday, April 20, 2006

This topic is archived.

Back to support forum

Forum search