rem: var card = editList.addressLists.GetElementAt(i); card = card.QueryInterface(Components.interfaces.nsIAbCard); var address; if (card.name.length) address = card.name + " <" + card.primaryEmail + ">"; else address = card.primaryEmail; SetInputValue(address, newTreeChildrenNode, templateNode); } 
add: var treeChildren = document.getElementById('addressList'); var newTreeChildrenNode = treeChildren.cloneNode(false); var templateNode = treeChildren.firstChild;  top.MAX_RECIPIENTS = 0; for ( var i = 0;  i < total; i++ ) { var card = editList.addressLists.GetElementAt(i); card = card.QueryInterface(Components.interfaces.nsIAbCard); var address; if (card.name.length) address = card.name + " <" + card.primaryEmail + ">"; else address = card.primaryEmail; SetInputValue(address, newTreeChildrenNode, templateNode); } var parent = treeChildren.parentNode; parent.replaceChild(newTreeChildrenNode, treeChildren); } 
context: function OnLoadEditList(){	doSetOKCancel(EditListOKButton, 0);		parentURI  = window.arguments[0].abURI;	var listUri  = window.arguments[0].listURI;	var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();	rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);	editList = rdf.GetResource(listUri);	editList = editList.QueryInterface(Components.interfaces.nsIAbDirectory);	document.getElementById('ListName').value = editList.listName;	document.getElementById('ListNickName').value = editList.listNickName;	document.getElementById('ListDescription').value = editList.description;	var treeChildren = document.getElementById('addressList');	var newTreeChildrenNode = treeChildren.cloneNode(false);	var templateNode = treeChildren.firstChild;		top.MAX_RECIPIENTS = 0;	if (editList.addressLists)	{		var total = editList.addressLists.Count();dump("*** editList.Count = "+total+"\n");		for ( var i = 0;  i < total; i++ )		{			var card = editList.addressLists.GetElementAt(i);			card = card.QueryInterface(Components.interfaces.nsIAbCard);			var address;			if (card.name.length)				address = card.name + " <" + card.primaryEmail + ">";			else				address = card.primaryEmail;			SetInputValue(address, newTreeChildrenNode, templateNode);		}	}    var parent = treeChildren.parentNode;     parent.replaceChild(newTreeChildrenNode, treeChildren); 	// focus on first name	var listName = document.getElementById('ListName');	if ( listName )		listName.focus();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/eabc8104c9b1462798def04119f2a10fa85ad116/abMailListDialog.js/clean/mailnews/addrbook/resources/content/abMailListDialog.js