开发者

Extjs values not submitted

When submitting a form with Extjs I can see the form items have values with this code just before the submit:

    var itemsForm = '';
    function mostraItems(item, index, length) { itemsForm += item.id + 开发者_JS百科':' + item.name + ':' + item.value + ':' + index + '\n'; }
    myForm.form.items.each(mostraItems);
    alert (itemsForm);
    myForm.form.submit({...

But when the request arrives at the handling page the form items are not there. I can see the request details with Firebug.

One of the form items is a ComboBox:

    var myCombo = new Ext.form.ComboBox({
    //autoWidth: true,
    width: 250,
    displayField: 'theFieldText',
    editable: false,
    emptyText: 'Select something ...',
    fieldLabel: 'Some text',
    listeners: { 'select': { fn: theOnSelect, scope: this} },
    mode: 'local',
    selectOnFocus: true,
    store: theStore,
    triggerAction: 'all',
    typeAhead: true,
    valueField: 'theFieldValue'
});

This is Extjs 2.1


You need to specify the "name" property in order to map the control to a form name-value pair.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜