我使用extjs 4和rails 3.我有一个包含组合框和数据视图的表单。在选择任何组合框的项目时,图像应显示在数据库的数据视图中。我试图使用tpl静态图像,它工作正常。但如何动态地检索?Extjs 4与dataview使用tpl的combobox
数据视图和模板::
{
xtype: 'dataview',
store: 'MyStore',
id:'viewer',
autoHeight:true,
tpl: imageTpl,
itemSelector: 'div.thumb-wrap',
fieldLabel: 'Choose State',
emptyText: 'No images available'
},
var imageTpl = new Ext.XTemplate(
'<tpl for=".">',
'<div style="thumb-wrap">',
'<img src="/images/rails.png" align="right" />',
'</div>',
'</tpl>'
);
任何建议的准则?
谢谢!
你是什么型号?你可以发布该代码吗? – Daan