Skip to content

Instantly share code, notes, and snippets.

@tissak
Created June 8, 2011 15:15
Show Gist options
  • Save tissak/1014616 to your computer and use it in GitHub Desktop.
Save tissak/1014616 to your computer and use it in GitHub Desktop.
ipv.classUtil.newManager = function(managerName, subjectClass){
var manager = dojo.getObject(managerName);
if(typeof(manager) == "undefined"){
manager = new function(){
this._widget = null;
this.getWidget = function(options){
options = dojo.mixin({}, options);
if (!this._widget) {
this._widget = new subjectClass();
}
this._widget.setOptions(options);
return this._widget;
}
};
dojo.setObject(managerName, manager);
}
return manager;
}
ipv.classUtil.newManager("ipv.widget.Breeze.BankDetailWizardManager", "ipv.widget.Breeze.BankDetailWizard");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment