本篇blog是来阐述如何修改一个已经渲染好的组件的配置属性呢?请看下面案例代码:
1、声明对象:
{xtype : ‘datefield’,fieldLabel : ‘查询 起’ ,name : ‘Searchstart’,width : 100,format : curformat,id : ‘Searchstart’}]},{columnWidth : .5,layout : ‘form’,bodyStyle : ‘padding:0px;border:0px’,border : false,items : [{xtype : ‘datefield’,fieldLabel : ‘查询 止’,name : ‘Searchend’,width : 100,format : curformat,id : ‘Searchend’}2、改变渲染对象配置属性:
//得到对象var Searchstart = Ext.getCmp(‘Searchstart’);var Searchend = Ext.getCmp(‘Searchend’);//改变配置属性Searchstart.format = curformat;Searchend.format = curformat;//重新渲染Searchstart.render();Searchend.render();
版权声明:本文为博主原创文章,未经博主允许不得转载。
,在泪水中浸泡过的微笑最灿烂,从迷惘中走出来的灵魂最清醒。