:: Forum >> Version 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.setId("groupAdd");
groupAdd.setControlText("Add An Empty Group");
// button click action
groupAdd.onControlClicked = function(event) {
    if ( 
isExtAlphaNumeric(document.getElementById("groupName").value) ) {
        var 
= new AW.HTTP.Request;
        
r.setURL("addCommissionGroup.asp");
        
r.setRequestMethod("POST");
        
r.setParameter("GName"document.getElementById("groupName").value );
        
r.request();
        
r.response = function( data ) {
            if ( 
data != "SUCCESS" ) {
                
alertdata " Group was not added." );
            }
            else {
                
// modify list here
                
            
}
        }
    }
};
document.write(groupAdd);
 
Paul Tiseo
Thursday, April 20, 2006
Paul,

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