Handling empty options with Ext Js Combobox

Template solution
We can work around this by introducing a template:

view sourceprint?01.new Ext.form.ComboBox({ 
02. 
typeAhead: true, 
03. 
triggerAction: 'all', 
04. 
transform:'number', 
05. 
width:135, 
06. 
forceSelection:true, 
07. 
emptyText:'Select a number...', 
08. 
allowBlank:true, 
09. 
tpl:'<tpl for=".">' + 
10. 
'<div class="x-combo-list-item">' + 
11. 
'{text}&nbsp;' + 
12. 
'</div></tpl>'
13.});

This template will create an Ext JS combo box that is very similar to a plain combo box:



参考: http://www.ashlux.com/wordpress/2009/09/04/handling-empty-options-with-ext-js-combo-box/

你可能感兴趣的:(ext,wordpress)