我有一个从文件字段扩展的组件,我添加了一个自定义属性'serverPath',我也定义了getter和setter.
代码:
Ext.define('MyApp.ux.Field.File',{
extend:'Ext.form.field.File',
xtype:'myfilefield',
serverPath:'',
getServerPath:function(){
return this.serverPath;
},
setServerPath:function(serverPath){
this.serverPath = serverPath;
}
});
Ext.create('MyApp.ux.Field.File',{
bind:{
serverPath:'{serverPath}'
},
viewModel:{
type:'myViewModel'
}
});
Run Code Online (Sandbox Code Playgroud)
我不会粘贴myViewModel的定义.很简单.
结果证明绑定没有生效.
有人可以帮忙吗?
在边框布局面板中,即使网格存储足够长以使网格溢出,网格的滚动条也无法正常工作!
如果我的网格在无边框布局面板中,滚动条就可以了,但是当我将网格放在边框布局面板中时,要么没有滚动条,要么滚动条无效!
{
// what i want is to make this grid to scroll ! the scroll-bar is nested in a border layout panel.
xtype: 'grid',
title: 'west bottom grid(I am begging for your scrollbar !)',
columns: [{
text: 'header',
dataIndex: 'header'
}],
store: Ext.create('MyApp.OverflowStore'), //this store is long enough to make the grid overflow
autoScroll: true
}
Run Code Online (Sandbox Code Playgroud)
完整代码:请参阅sencha小提琴:https://fiddle.sencha.com/#fiddle/ffv
如果有人可以帮助给网格一个正确的滚动条?