
/*
	"Hemi" JavaScript Framework
	Engine for Web Applications 3.1
	Composite file "hemi.comp.js" release: 3.1.1
	Copyright 2002 - 2010. All Rights Reserved.
	Author: Stephen W. Cote
	Email: sw.cote@gmail.com
	Project: http://www.whitefrost.com/Hemi/
	BSD License: http://www.whitefrost.com/Hemi.license.txt
*/
(function(){H.include("hemi.task");H.include("hemi.app.comp");H.include("hemi.app.space");H.namespace("app.dwac",H,{atkey:"is-dwac",aturi:"DWacControlUri",attk:"DWacControlTask",attid:"DWacTemplateId",newInstance:
function(o,u,t,k,i){if(!o)return;var b=0;if(!D.TF(o.getObjectType)||o.getObjectType()!="xhtml_component"){o=H.object.xhtml.newInstance(o,1);b=1;}var r=H.app.comp.newInstance(0,0,o.getObjectId(),0,0,0);r.p.DWacControlUri=u;r.p.DWacControlTask=k;r.p.DWacTemplateId=t;r.component_init=function(){this.setTemplateIsSpace(1);this.o.task_service=new H.task.serviceImpl();this.scopeHandler("processor",0,0,1);};r._handle_processor=function(Service,ParentTask,TaskName,Value){return this._handle_xhtml_token(2,Value);};r.component_post_init=function(){var sU=this.p.DWacControlUri;var sT=this.p.DWacControlTask;var sTId=this.p.DWacTemplateId;if(typeof sTId!="string"||sTId.length==0)sTId=0;if(typeof sU=="string"&&sU.length>0){if(typeof sT=="string"&&sT.length>0){this.p.dwac_template_path=sU;this.o.dwac_task=this.o.task_service.executeTaskLoader("dwac_loader","xml",sU,"import-task",sT,this._prehandle_processor);}else{this.LoadDwacTemplate(sU,sTId);}}};r.handle_dwac_task=function(s,v){var sU=this.getContainer().getAttribute("DWacControlUri");var sTId=this.getContainer().getAttribute("DWacTemplateId");if(typeof sTId!="string"||sTId.length==0)sTId=0;if(typeof sU=="string"&&sU.length>0)this.LoadDwacTemplate(sU,sTId);};r.LoadDwacTemplate=function(sPath,sTemplateId){this.p.dwac_template_path=sPath;this.loadTemplate(sPath,sTemplateId);};r.GetDwacTemplatePath=function(){return this.p.dwac_template_path;};r.local_handle_xhtml_token=function(iType,sTokenValue){sTokenValue=sTokenValue.replace(/\$\{dwac\.path\}/g,this.GetDwacTemplatePath());return sTokenValue;};if(!i)i=H.guid();r.importComponentDefinition("",i,0);if(b)r.component_post_init();return r;}});}());
/* End Hemi Framework 3.1 */
