PDA

View Full Version : Problem with LovCombo



maksimka2112
26 Aug 2015, 9:34 AM
Good day! Sorry for the bad english.I use lovCombo.
I need your help. Just an example: insert text into LovCombo to send to the server: MY TEXT. In the drop-down list I get options:
MY TEXT 1
MY TEXT 2
MY TEXT 3
I opt for the first and third points. I have the results in the combo box: MY TEXT 1; MY TEXT 3. Then put the ";" and try to send the following request to the server: MY SECOND TEXT. In the drop-down list, I have a response from the database on the server:
MY SECOND TEXT 1
MY SECOND TEXT 2
MY SECOND TEXT 3
I am trying to select the second point. As a result, in the combo box I expect the following result: MY TEXT 1; MY TEXT 3; MY SECOND TEXT 2But I have only MY SECOND TEXT 2. Previous versions have disappeared! The string must be complemented! But this is not happening. What should I do?Sorry for my English....

var tplka = new Ext.XTemplate(
'<tpl for="." ><div class="search-item" >',
'<b>{res}</b><br/><input type=hidden id=pnt1 value={pnt1} >',
'</div></tpl>');
var cmbPnt2Store = new Ext.data.Store({
url: 'phps/combobox.php',
baseParams: {priznak: 'pnt2'},
reader: new Ext.data.JsonReader ({
root: 'dan',
totalProperty: 'total',
id: 'id1Pnt2' },
[ {name: 'res' , mapping: 'res'},
{name: 'pnt1', mapping: 'pnt1'}
]
), autoLoad: false})

var cmbPnt2 = new Ext.ux.form.LovCombo({
separator: ';',
hideOnSelect:false,
editable: true,
hiddenName: 'rrrrr',
store: cmbPnt2Store,
loadingText: 'loading...',
displayField: 'res',
valueField: 'pnt1',
pageSize:15,
mode: 'remote',
forceSelection: true,
triggerAction: 'all',
minChars:4,
hideTrigger:true,
tpl: tplka,
itemSelector: 'div.search-item',
id: 'cmbPnt2',
hideLabel: true
});

Gary Schlosberg
28 Aug 2015, 6:36 AM
You might try posting your question to the LovCombo thread:
https://www.sencha.com/forum/showthread.php?32692