Wtf.attributeComponent=function(A){Wtf.apply(this,A);Wtf.attributeComponent.superclass.constructor.call(this,A)};Wtf.extend(Wtf.attributeComponent,Wtf.Panel,{initComponent:function(){Wtf.attributeComponent.superclass.initComponent.call(this);this.addEvents({"closeform":true})},onRender:function(config){Wtf.attributeComponent.superclass.onRender.call(this,config);Wtf.Ajax.requestEx({url:"jspfiles/admin/LacaStructure.jsp",method:"POST",params:{userid:(this.facId)?this.facId:loginid,configFlag:"true",configType:this.configType,flag:71,refid:this.refid}},this,function(response,options){var responseObj=eval("("+response+")");for(var i=0;i<responseObj.data.length;i++){if(responseObj.data[i].configtype==0){Wtf.getCmp(this.id).add(new Wtf.form.TextField({fieldLabel:responseObj.data[i].fieldname,name:responseObj.data[i].fieldname,value:responseObj.data[i].configdata[0],maxLength:50,scope:this,width:this.widthValue,disabled:(responseObj.data[i].disable==0)?false:true,allowBlank:(responseObj.data[i].allowblank==0)?false:true}))}else{if(responseObj.data[i].configtype==1){Wtf.getCmp(this.id).add(new Wtf.form.NumberField({fieldLabel:responseObj.data[i].fieldname,name:responseObj.data[i].fieldname,value:(!isNaN(responseObj.data[i].configdata[0]))?responseObj.data[i].configdata:0,maxLength:50,scope:this,width:this.widthValue,disabled:(responseObj.data[i].disable==0)?false:true,allowBlank:(responseObj.data[i].allowblank==0)?false:true}))}else{if(responseObj.data[i].configtype==2){Wtf.getCmp(this.id).add(new Wtf.form.Checkbox({fieldLabel:responseObj.data[i].fieldname,name:responseObj.data[i].fieldname,checked:responseObj.data[i].configdata[0],scope:this,disabled:(responseObj.data[i].disable==0)?false:true}))}else{if(responseObj.data[i].configtype==3){Wtf.getCmp(this.id).add(new Wtf.form.DateField({fieldLabel:responseObj.data[i].fieldname,name:responseObj.data[i].fieldname,value:responseObj.data[i].configdata[0],allowBlank:false,width:this.widthValue,disabled:(responseObj.data[i].disable==0)?false:true,allowBlank:(responseObj.data[i].allowblank==0)?false:true}))}else{if(responseObj.data[i].configtype==4){var storedata=[];if(responseObj.data[i].masterdata!=null){for(var ctr=0;ctr<responseObj.data[i].masterdata.length;ctr++){var storerecord=[];storerecord.push(responseObj.data[i].masterdata[ctr].id);storerecord.push(responseObj.data[i].masterdata[ctr].data);storedata.push(storerecord)}}this.ruleTypeStore=new Wtf.data.SimpleStore({fields:["id","name"],data:storedata});this.ruleTypeCombo=new Wtf.form.ComboBox({triggerAction:"all",store:this.ruleTypeStore,mode:"local",width:this.widthValue,listWidth:this.widthValue,displayField:"name",fieldLabel:responseObj.data[i].fieldname,valueField:"id",name:responseObj.data[i].fieldname,hiddenName:responseObj.data[i].fieldname,allowBlank:false,editable:false,value:responseObj.data[i].configdata[0],disabled:(responseObj.data[i].disable==0)?false:true,allowBlank:(responseObj.data[i].allowblank==0)?false:true});Wtf.getCmp(this.id).add(this.ruleTypeCombo)}else{if(responseObj.data[i].configtype==5){Wtf.getCmp(this.id).add({layout:"fit",border:false,items:new Wtf.form.HtmlEditor({fieldLabel:responseObj.data[i].fieldname,width:this.widthValue,disabled:(responseObj.data[i].disable==0)?false:true,allowBlank:(responseObj.data[i].allowblank==0)?false:true})})}else{if(responseObj.data[i].configtype==6){Wtf.getCmp(this.id).add(new Wtf.form.TextArea({fieldLabel:responseObj.data[i].fieldname,name:responseObj.data[i].fieldname,value:responseObj.data[i].configdata[0],maxLength:50,scope:this,width:this.widthValue,disabled:(responseObj.data[i].disable==0)?false:true,allowBlank:(responseObj.data[i].allowblank==0)?false:true}))}else{if(responseObj.data[i].configtype==7){var storedata1=[];if(responseObj.data[i].masterdata!=null){for(var ctr1=0;ctr1<responseObj.data[i].masterdata.length;ctr1++){var storerecord1=[];storerecord1.push(responseObj.data[i].masterdata[ctr1].id);storerecord1.push(responseObj.data[i].masterdata[ctr1].data);storedata1.push(storerecord1)}}this.ruleTypeStore1=new Wtf.data.SimpleStore({fields:["id","name"],data:storedata1});Wtf.getCmp(this.id).add(new Wtf.common.Select(Wtf.applyIf({multiSelect:true,forceSelection:true},{triggerAction:"all",store:this.ruleTypeStore1,mode:"local",width:this.widthValue,listWidth:this.widthValue,displayField:"name",fieldLabel:responseObj.data[i].fieldname,valueField:"id",hiddenName:responseObj.data[i].fieldname,name:responseObj.data[i].fieldname,value:responseObj.data[i].configdata,scope:this,disabled:(responseObj.data[i].disable==0)?false:true,allowBlank:(responseObj.data[i].allowblank==0)?false:true})))}}}}}}}}}this.fireEvent("closeform",this.id)},function(request,response){this.fireEvent("closeform",this.id)})}})