PDA

View Full Version : Combobox queryMode: 'remote'



victorvidigal
14 Nov 2011, 11:05 AM
Hi, this is my first post. I'm from Brasil.
I'm trying to use a combobox with queryMode: 'remote'.
It was worked until I removed this: <script type="text/javascript" src="../../libs/extjs/bootstrap.js"></script>

Now, I'm using <script type="text/javascript" src="../../libs/extjs/ext-all-debug-w-comments.js"></script>
But combobox don't work.

If I use <script type="text/javascript" src="../../libs/extjs/ext-all-debug.js"></script>
it's work!
but if I use <script type="text/javascript" src="../../libs/extjs/ext-all.js"></script>
it's don't work too!

It's don't send the param 'query' to my server side.
can somebody help me?

this is my combo's code:



xtype: 'combo',
id: 'idComboInstituicao',
forceSelection: true,
listeners:{
scope: this,
'select': function(combo, record, index) {
jQuery.ajax({
url: '../../controllers/Facade.php?method=associaInstituicaoUsuario&entity=Docente&idInstituicao='+combo.getValue(),
async: false,
success: function(data) {
dsInstituicoes.load();
var c = Ext.getCmp('idComboInstituicao');
c.reset();
}
});
}
},
store: ds,
displayField: 'nome',
valueField: 'idInstituicao',
typeAhead: false,
hideLabel: true,
hideTrigger:true,
anchor: '100%',
queryMode: 'remote',
queryParam: 'query',
triggerAction: 'all',
queryCaching: true,
autoSelect: true,

listConfig: {
loadingText: 'Procurando...',
emptyText: 'Nenhuma Instituição encontrada.',
getInnerTpl: function() {
return '<a class="search-item">' +
'<h3><span>{nome}</span></h3>' +
'</a>' +
'{cidade} {uf}';
}
},
pageSize: 10


thanks

mitchellsimoens
14 Nov 2011, 1:27 PM
Just seems to be something funny happening between builds so I would say stick with one that works.

victorvidigal
14 Nov 2011, 2:01 PM
however, if I use <script type="text/javascript" src="../../libs/extjs/ext-all-debug.js"></script>
combobox works but all forms submit in my application don't work.
the following error occur :
this.up("form") is undefined


var form = this.up('form').getForm();

It's only changing:
1) <script type="text/javascript" src="../../libs/extjs/ext-all-debug.js"></script>
and
2) <script type="text/javascript" src="../../libs/extjs/ext-all-debug-w-comments.js"></script>

victorvidigal
26 Nov 2011, 6:31 AM
I fix this.
I downloaded again the extjs and replace all my lib.
I think that I was mixed two versions of extjs.


Thank's