RE: getId() don't get what setId() ?
I'm having the same problem described in this archived topic:
http://www.activewidgets.com/javascript.forum.22757.1/getid-don-t-get-what.html
I.e., I do setId on a list and then later the ID is not set (getId does not give me what I set it to), e.g.:
var list = new AW.UI.List;
list.setItemText(myItems);
list.setItemCount(4);
list.setId("test_list");
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setColumnCount(3);
obj.setRowCount(3);
var ct = new AW.Templates.Combo;
obj.setCellTemplate(ct, 1,0);
obj.setPopupTemplate(list, 1,0);
ct.getPopupTemplate().setStyle("width", "100%");
ct.getPopupTemplate().setStyle("height", 8 * 17);
list.onItemClicked = function(event,i) {
var text = this.getItemText(i);
var thisId = this.getId(); //this is NOT 'test_list' but something like 'aw4-popup..'
alert(thisId + " : " + text);
}
document.write(obj);
How can I set the ID of the list and have it "stick"?
http://www.activewidgets.com/javascript.forum.22757.1/getid-don-t-get-what.html
I.e., I do setId on a list and then later the ID is not set (getId does not give me what I set it to), e.g.:
var list = new AW.UI.List;
list.setItemText(myItems);
list.setItemCount(4);
list.setId("test_list");
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setColumnCount(3);
obj.setRowCount(3);
var ct = new AW.Templates.Combo;
obj.setCellTemplate(ct, 1,0);
obj.setPopupTemplate(list, 1,0);
ct.getPopupTemplate().setStyle("width", "100%");
ct.getPopupTemplate().setStyle("height", 8 * 17);
list.onItemClicked = function(event,i) {
var text = this.getItemText(i);
var thisId = this.getId(); //this is NOT 'test_list' but something like 'aw4-popup..'
alert(thisId + " : " + text);
}
document.write(obj);
How can I set the ID of the list and have it "stick"?
Andrew Smith
January 9,