In my project, I want to use ExtJS combobox component like text field to send the value. Already assign an ID and name, but it can't send the value. why? I find a solution, so share it with you. If you can't read Chinese, scroll down the page, I wrote the answer.
I'm not a professional RIA developer, still a leaner.
*******
在ExtJS的開發過程中,想要利用Combobox元件內的值傳送數值,但是辦不到。用Ext.getDom的方法,明明旁邊的TextField就可以。究竟發生什麼問題? 在其他開發者的經驗分享中,我找到了解決方式。
原本的Combobox內容程式定義如下
var columnMenu = new Ext.form.ComboBox({
fieldLabel: 'Column Name',
name: 'columnNameValue',
store: columnName,
hideLabel: false,
displayField: 'key',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText: 'Select a Column',
selectOnFocus: true,
width: 170
});
元件的定義看似完整了,但是還少了一個屬性
hiddenName: 'columnNameValue',
是的!請加入hiddenName
接著請用Ext.getDom("columnNameValue")的方法使用這個ComboBox
*******
The answer is easy, please attach a attribute which named "hiddenName"
沒有留言:
張貼留言