PDA

View Full Version : ExtJS 3.0 Ajax request method



edinho77
26 May 2009, 11:34 AM
Hi!

I 've upgraded to the 3.0 version of ExtJS from 2.2.1 and I found a problem with the method my ajax request is using. With the 2.2.1 version when the load method to populate the grid store was called the method used was POST but now it is using GET. I'm not sure where the change comes from.

Here is the proxy I'm using:


var taskProxy = new Ext.data.HttpProxy({
url: 'cargahoras.php',
method: 'POST'
});
The store:


var taskStore = new Ext.data.GroupingStore({
sortInfo:{field: 'date', direction: "DESC"},
groupField:'date',
id: 'horasCargadasDataStore',
proxy: taskProxy,
baseParams:{task: "LISTING"},
reader: ajaxReader
});
And part of the grid code


// The main grid with all it's configuration options
var grid = new xg.EditorGridPanel({
id:'tasks-grid',
store: taskStore,
sm: selections,
enableColumnHide:false,
enableColumnMove:false,
border:false,
title:'Registro Multiple',
iconCls:'icon-show-all',
region:'center',
loadMask:{msg: 'Cargando datos...',removeMask:true},
listeners : {
render : function(){
this.loadMask.show();
var store = this.getStore();
store.load.defer(100,store, [ {params:{a:1, b:2 } }]);
},
delay: 100
},
plugins: [
summary,
completeColumn
],
columns: [
{
header: "idCarga",
width:0,
hidden: true,
sortable: false,
dataIndex: 'taskId',
editor: new Ext.form.NumberField({
hidden: true
})
},
{
header: "Fecha Registro",
width:94,
sortable: true,
dataIndex: 'date',
renderer: Ext.util.Format.dateRenderer('Y-m-d'),
validationDelay: 0,
groupRenderer: textDate(),
groupName: 'Día',
align: 'center',
editor: rowFecReg
},
{
header: "ID Proy.",
width:46,
sortable: true,
dataIndex: 'project',
align: 'right'
},
{
header: "Nombre Proyecto",
width:140,
sortable: true,
dataIndex: 'pro_name'
},
{
header: "Comentario Carga",
width: 130,
sortable: true,
dataIndex: 'comments',
editor: rowComentario
},
completeColumn
],

view: new Ext.grid.GroupingView({
forceFit:true,
ignoreAdd: true,
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Tareas" : "Tarea"]})',
templates: {
header: headerTpl
},
enableRowBody:true,
showPreview: false,
getRowClass : function(record, rowIndex, p, taskStore){
if(record.data.idSolicitud != ''){
p.body = '<p>Solicitud asociada: '+record.data.idSolicitud+' - "'+record.data.sol_nombre+'"</p>';
}else{
p.body = '<p>Solicitud asociada: Sin solicitud asociada</p>';
}
if(this.showPreview){
return 'x-grid3-row-expanded';
}
return 'x-grid3-row-collapsed';
}
})
});
Please, let me know if you need any more information.
Thanks for your help!!!

Animal
26 May 2009, 11:41 AM
It's a known bug in RC1.1.

edinho77
26 May 2009, 12:05 PM
Thanks.
Do you have any idea when the new release will be available to download?

Animal
26 May 2009, 11:27 PM
Not a clue.

tryanDLS
27 May 2009, 7:47 AM
RC2 is targeted for a 6/1 release.

naxito
28 May 2009, 1:26 AM
by now you can check the following posts
http://extjs.com/forum/showthread.php?t=69452
http://www.extjs.com/forum/showthread.php?p=326093#post326093