:: Forum >>

RE: getId() don't get what setId() ?

I'm having the same problem described in this archived topic:


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;

var obj = new AW.UI.Grid;

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);


How can I set the ID of the list and have it "stick"?
Andrew Smith
Friday, January 9, 2009
It is possible to set your own id only for the standalone objects. In your case the list is used as a template, so the template id will be generated automatically from the parent control id and the template name (and indices). So if you set the grid id to "myGrid" the popup id will be "myGrid-popup-1-0".
Alex (ActiveWidgets)
Tuesday, January 13, 2009

This topic is archived.

Back to support forum

Forum search