-
8 Mar 2013 2:53 AM #1
[4.1.1a] CRITICAL BUG. Multiselect Combobox and submit method
[4.1.1a] CRITICAL BUG. Multiselect Combobox and submit method
Ext version tested:
- Ext 4.1.1a
- FF,Opera,IE
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">, and no DOCTYPE
- Submit method submits only the last value of multiselect combobox
- Run the attached example
- The submit method was expected to submit all values of multiselect combobox
- It submits only the last value
JSON looks like thisCode:<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=windows-1251" /> <link rel="stylesheet" type="text/css" href="ext-4.1.1a/resources/css/ext-all.css" /> <script type="text/javascript" src="ext-4.1.1a/ext-all.js"></script> <script type="text/javascript" src="ext-4.1.1a/locale/ext-lang-ru.js"></script> <script type="text/javascript"> Ext.Loader.setConfig({enabled: true}) Ext.Loader.setPath('Ext.ux','ext-4.1.1a/examples/ux') Ext.onReady(function(){ Ext.define('Ext.ux.CustomTrigger2', { extend:'Ext.form.field.ComboBox', alias:'widget.multiselectcombo', displayField:'name', valueField:'id', queryMode:'remote', trigger1Cls:Ext.baseCSSPrefix+'form-clear-trigger', trigger2Cls:Ext.baseCSSPrefix+'form-search-trigger', onTrigger1Click:function(){ this.setValue("") }, minChars:1, emptyText:'Search', pageSize:false, triggerAction:'query', delimiter:',' }) Ext.create('Ext.form.Panel', { title: 'Simple Form', bodyPadding: 5, width: 350, url: 'save-form.php', layout: 'anchor', defaults: { anchor: '100%' }, defaultType: 'textfield', items: [{ anchor:'100%', labelWidth:'100%', fieldLabel:'My combo', labelSeparator:'', xtype:'multiselectcombo', multiSelect:true, id:'attr_73208_', name:'attr_73208_', store:{fields:[{name:'id',type:'int'},{name:'name',type:'string'}], proxy:{type:'ajax',url:'json/reftext.php?id=73208'}} }], buttons: [{ text: 'Submit', handler: function() { var form = this.up('form').getForm(); form.submit(); } }], renderTo: Ext.getBody() }); }); </script> </head> <body></body> </html>
HELPFUL INFORMATIONCode:[{id:'1',name:'Россия'},{id:'2',name:'Украина'}]
If we check the server code, we can see that in the POST we get only the last value from the combobox
Additional CSS used:Code:<?php // save-form.php file file_put_contents("txt.txt",$_POST['attr_73208_']); ?>- only default ext-all.css
- Win 7
-
8 Mar 2013 2:59 AM #2
...
...
Plan to buy commercial version of ext this week, but a number of critical bugs, such as scrolling in the grid when clicking on the cell and doubling of a checkbox column in locking grid halt me a little bit.
Probably, what I'm reporting in this thread is not a bug and there should be done some config. If not, hope there is a simple fix for this.
-
8 Mar 2013 3:42 AM #3
...
...
As I expected what I'm facing here is not a bug. I just had to name the field like 'attr_73208_[]' and to treat it as a PHP array, but not as a string. Did not see it in documentation.
Victor.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote