rem: d.addCallback(bind(function() { 
add: trans.addCallback(bind(function() { 
context: Freja.View.prototype.render = function(model, placeholder /* optional */ ) {	try {		var id = (typeof(placeholder) == "undefined") ? this.placeholder : placeholder;		this.destination = $(id);		// @todo    Is this a good idea ?		// Perhaps we should leave it to the programmer to do this.		this.destination.innerHTML = Freja.AssetManager.THROBBER_HTML;		if (!this.ready) {			connect(this, "onload", bind(this.render, this, model));			return;		}		if (model && !model.ready) {			connect(model, "onload", bind(this.render, this, model));			return;		}		if (!model) {			model = { document : (new DOMParser()).parseFromString("<?xml version='1.0' ?><dummy/>", "text/xml")};		}		var d = this.renderer.transform(model, this);		d.addCallback(bind(function(html) {			this.destination.innerHTML = html;		}, this));		d.addCallback(bind(function() {			MochiKit.Signal.signal(this, "onrendercomplete", this.destination)		}, this));	} catch (ex) {		alert(ex.message);	}}
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/Freja.js/buggy/trunk/lib/Freja.js