rem: var dbKey = items[0].firstChild.firstChild.getAttribute('display'); 
add: var item = tree.contentView.getItemAtIndex(tree.currentIndex); var dbKey = item.firstChild.firstChild.getAttribute('display'); 
context: function updateCertDump(){  var asn1Outliner = document.getElementById('prettyDumpOutliner').                     outlinerBoxObject.view.QueryInterface(nsIASN1Outliner);  var tree = document.getElementById('treesetDump');  var items=tree.selectedItems;  if (items.length==0) {    alert("No items are selected."); //This should never happen.  } else {    var dbKey = items[0].firstChild.firstChild.getAttribute('display');    //  Get the cert from the cert database    var certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB);    var cert = certdb.getCertByDBKey(dbKey,null);    asn1Outliner.loadASN1Structure(cert.ASN1Structure);  }  displaySelected();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/07d96867f11683becf5e1a6ca5e64e6a9324c957/viewCertDetails.js/clean/security/manager/pki/resources/content/viewCertDetails.js