in tapestry-framework/src/js/dojo-0.4.3-custom-4.1.6/src/widget/Widget.js [12:236]
},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){
return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase();
},toString:function(){
return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]";
},repr:function(){
return this.toString();
},enable:function(){
this.disabled=false;
},disable:function(){
this.disabled=true;
},onResized:function(){
this.notifyChildrenOfResize();
},notifyChildrenOfResize:function(){
for(var i=0;i<this.children.length;i++){
var _2=this.children[i];
if(_2.onResized){
_2.onResized();
}
}
},create:function(_3,_4,_5,ns){
if(ns){
this.ns=ns;
}
this.satisfyPropertySets(_3,_4,_5);
this.mixInProperties(_3,_4,_5);
this.postMixInProperties(_3,_4,_5);
dojo.widget.manager.add(this);
this.buildRendering(_3,_4,_5);
this.initialize(_3,_4,_5);
this.postInitialize(_3,_4,_5);
this.postCreate(_3,_4,_5);
return this;
},destroy:function(_7){
if(this.parent){
this.parent.removeChild(this);
}
this.destroyChildren();
this.uninitialize();
this.destroyRendering(_7);
dojo.widget.manager.removeById(this.widgetId);
},destroyChildren:function(){
var _8;
var i=0;
while(this.children.length>i){
_8=this.children[i];
if(_8 instanceof dojo.widget.Widget){
this.removeChild(_8);
_8.destroy();
continue;
}
i++;
}
},getChildrenOfType:function(_a,_b){
var _c=[];
var _d=dojo.lang.isFunction(_a);
if(!_d){
_a=_a.toLowerCase();
}
for(var x=0;x<this.children.length;x++){
if(_d){
if(this.children[x] instanceof _a){
_c.push(this.children[x]);
}
}else{
if(this.children[x].widgetType.toLowerCase()==_a){
_c.push(this.children[x]);
}
}
if(_b){
_c=_c.concat(this.children[x].getChildrenOfType(_a,_b));
}
}
return _c;
},getDescendants:function(){
var _f=[];
var _10=[this];
var _11;
while((_11=_10.pop())){
_f.push(_11);
if(_11.children){
dojo.lang.forEach(_11.children,function(_12){
_10.push(_12);
});
}
}
return _f;
},isFirstChild:function(){
return this===this.parent.children[0];
},isLastChild:function(){
return this===this.parent.children[this.parent.children.length-1];
},satisfyPropertySets:function(_13){
return _13;
},mixInProperties:function(_14,_15){
if((_14["fastMixIn"])||(_15["fastMixIn"])){
for(var x in _14){
this[x]=_14[x];
}
return;
}
var _17;
var _18=dojo.widget.lcArgsCache[this.widgetType];
if(_18==null){
_18={};
for(var y in this){
_18[((new String(y)).toLowerCase())]=y;
}
dojo.widget.lcArgsCache[this.widgetType]=_18;
}
var _1a={};
for(var x in _14){
if(!this[x]){
var y=_18[(new String(x)).toLowerCase()];
if(y){
_14[y]=_14[x];
x=y;
}
}
if(_1a[x]){
continue;
}
_1a[x]=true;
if((typeof this[x])!=(typeof _17)){
if(typeof _14[x]!="string"){
this[x]=_14[x];
}else{
if(dojo.lang.isString(this[x])){
this[x]=_14[x];
}else{
if(dojo.lang.isNumber(this[x])){
this[x]=new Number(_14[x]);
}else{
if(dojo.lang.isBoolean(this[x])){
this[x]=(_14[x].toLowerCase()=="false")?false:true;
}else{
if(dojo.lang.isFunction(this[x])){
if(_14[x].search(/[^\w\.]+/i)==-1){
this[x]=dojo.evalObjPath(_14[x],false);
}else{
var tn=dojo.lang.nameAnonFunc(new Function(_14[x]),this);
dojo.event.kwConnect({srcObj:this,srcFunc:x,adviceObj:this,adviceFunc:tn});
}
}else{
if(dojo.lang.isArray(this[x])){
this[x]=_14[x].split(";");
}else{
if(this[x] instanceof Date){
this[x]=new Date(Number(_14[x]));
}else{
if(typeof this[x]=="object"){
if(this[x] instanceof dojo.uri.Uri){
this[x]=dojo.uri.dojoUri(_14[x]);
}else{
var _1c=_14[x].split(";");
for(var y=0;y<_1c.length;y++){
var si=_1c[y].indexOf(":");
if((si!=-1)&&(_1c[y].length>si)){
this[x][_1c[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_1c[y].substr(si+1);
}
}
}
}else{
this[x]=_14[x];
}
}
}
}
}
}
}
}
}else{
this.extraArgs[x.toLowerCase()]=_14[x];
}
}
},postMixInProperties:function(_1e,_1f,_20){
},initialize:function(_21,_22,_23){
return false;
},postInitialize:function(_24,_25,_26){
return false;
},postCreate:function(_27,_28,_29){
return false;
},uninitialize:function(){
return false;
},buildRendering:function(_2a,_2b,_2c){
dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", ");
return false;
},destroyRendering:function(){
dojo.unimplemented("dojo.widget.Widget.destroyRendering");
return false;
},addedTo:function(_2d){
},addChild:function(_2e){
dojo.unimplemented("dojo.widget.Widget.addChild");
return false;
},removeChild:function(_2f){
for(var x=0;x<this.children.length;x++){
if(this.children[x]===_2f){
this.children.splice(x,1);
_2f.parent=null;
break;
}
}
return _2f;
},getPreviousSibling:function(){
var idx=this.getParentIndex();
if(idx<=0){
return null;
}
return this.parent.children[idx-1];
},getSiblings:function(){
return this.parent.children;
},getParentIndex:function(){
return dojo.lang.indexOf(this.parent.children,this,true);
},getNextSibling:function(){
var idx=this.getParentIndex();
if(idx==this.parent.children.length-1){
return null;
}
if(idx<0){
return null;
}
return this.parent.children[idx+1];
}});
dojo.widget.lcArgsCache={};
dojo.widget.tags={};
dojo.widget.tags.addParseTreeHandler=function(_33){