Hello everybody, I've a real big problem with this code.....I hope someone could help me
Here is the code:
Code:
var lettore = new Ext.data.ArrayReader({}, [
{name: 'id_commessa'},
{name: 'descrizione_commessa'},
{name: 'id_ordine'},
{name: 'id_posizione'},
{name: 'descrizione_posizione'},
{name: 'id_fattura'}
]);
var radioArray = [];
var store_appr_tecn = new Ext.data.GroupingStore({
reader: lettore,
sortInfo:{field: 'descrizione_commessa', direction: "ASC"},
groupField:'id_fattura'
});
//sul load dello store approvazione tecnica creo un array per il radiogroup
store_appr_tecn.on('load',function(){
var contatore = 0;
var fattura_base = -1;
this.each(function(record){
var fattura_attuale = record.get('id_fattura');
if(fattura_base != fattura_attuale){
fattura_base = fattura_attuale;
//il campo name è fondamentale se si vuole una selezione mutuamente esclusiva
radioArray.push({boxLabel: 'Fattura '+record.get('id_fattura'), name: 'Fattura', inputValue: record.get('id_fattura')});
contatore = contatore + 1;
}
})
if (contatore != 0){
sup_dx_inf_panel.removeAll();
sup_dx_inf_panel.add(radioGroupFatture); //aggiungo dinamicamente la checkgroup che si popola dopo il load dello store
sup_dx_inf_panel.doLayout();//forzo a ricaricare il layout
}
if(contatore == 0){
finestraAvviso('Non hai nessuna richiesta di approvazione tecnica in sospeso','Informazione');
}
else if(contatore == 1) {
finestraAvviso('Attenzione, hai ancora in sospeso '+contatore+' richiesta di approvazione tecnica','Informazione');
}
else{
finestraAvviso('Attenzione, hai ancora in sospeso '+contatore+' richieste di approvazioni tecniche','Informazione');
}
});
As you can see I have a groupingStore........and at the beginning (at the first load) I have no problem
After that I make an AjaxRequest and on the success I made the store.removeAll and store.loadData
Ok, here comes the problem......when I reach the code line
sup_dx_inf_panel.doLayout()
I obtain this error on firebug:
uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOM3Node.compareDocumentPosition]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame ::
http://192.168.42.210/act_man/devel/...-base-debug.js :: <TOP_LEVEL> :: line 1906" data: no]
On the net I found a similar issue:
http://stackoverflow.com/questions/5...abpanels-extjs
But I don't use static IDs (or at least I don't think so)
here is radioGroupFatture:
Code:
var radioGroupFatture = new Ext.form.FieldSet({
//xtype: 'fieldset',
title: 'Lista Fatture (Cliccare per espandere)',
autoHeight: true,
layout: 'auto',
collapsed: true, // initially collapse the group
collapsible: true,
items:[{
xtype: 'radiogroup',
columns: 5,
items: radioArray,
listeners:{
change: function(gruppo, singolo){
if (parseInt(singolo.inputValue) != null){
sup_dx_inf_panel.buttons[1].setDisabled(false);
}
else{
sup_dx_inf_panel.buttons[1].setDisabled(true);
}
}
}
}]
});
Could someone help me......I'm a newbie 
Sorry for my english and thanks everybody