Skip to content

Instantly share code, notes, and snippets.

@twinge
Created January 25, 2010 06:02
Show Gist options
  • Save twinge/285664 to your computer and use it in GitHub Desktop.
Save twinge/285664 to your computer and use it in GitHub Desktop.
private function showDetail(e:Event) {
var res:XMLList
if (e.target.toString().indexOf("List") >= 0) {
var lbl:String;
var xpath:String;
var q:XPathQuery = new XPathQuery(xpath);
lbl = mcResults.lstResults.itemToLabel(e.target.selectedItem);
xpath = "//supplier[name = '" + lbl + "']";
res = q.exec(xmlContent)[0];
} else {
res = xmlContent.suppliers.supplier.(@id==e.target.id);
}
populateDetail(res);
// Set last updated
detail.mcProducts.lastUpdated.text = xmlContent.lastupdate;
detail.x = 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment