Extjs 연동 작업

2839 단어 ExtJs
이것은 연동된 조작이다
위 섹션:
                items : [
                    {columnWidth : .5,layout : 'form',
                        items : {
                        id: "add-triggerType",
                        xtype: 'triggerType',   
                        showAll:false,
                        name:'triggerType',
                        dictTypeCode: 'COLL.TASK.TRIGGERTYPE',
                        fieldLabel: '<span style=\"color:red\">*</span> ',
                        width: 150,
                        listWidth: 150,
                        allowBlank: true,
                        listeners:{   // ,
                            select:function(field){
                               
                                var isAdd = Ext.getCmp("collScheduleWin").isAdd;
                               
                                if(isAdd){
                                      Ext.getCmp("add-maxScheduleTime").enable();
                                      Ext.getCmp("add-schedulePeriod").enable();
                                    }
                                else{     
                                  if(field.getValue()=='c'){
                                       Ext.getCmp("add-maxScheduleTime").disable();
                                       Ext.getCmp("add-schedulePeriod").disable();
                                  }
                                  else{
                                      Ext.getCmp("add-maxScheduleTime").enable();
                                      Ext.getCmp("add-schedulePeriod").enable();
                                  }
                                }
                            }
                        }
                       
                    }}
                ]

아래의 연동 부분:
items : [
					{columnWidth : .5,layout : 'form',
						items : [{xtype:'numberfield',
								  fieldLabel:" ",
								  width:150,
								  name:'maxScheduleTime',
							      disabled:false,
//							      editable : false,
								  id:'add-maxScheduleTime'}]},
							
					{columnWidth : .5,layout : 'form',
						  items : [{xtype:'numberfield',
									  fieldLabel:" ",
									  width:150,
									  name:'schedulePeriod',
									  disabled:true,
									  id:'add-schedulePeriod'}]}
				]

 

좋은 웹페이지 즐겨찾기