Apr 11, 2012, 1:58 PM
[CLOSED] ComponentLoader inconsistency
Hi folks, i´m writing in relation to an issue that is driving me crazy
I have 2 GridPanels when i call the method ComponentLoader.ToJason i get the following results when pass them as parameters
Result 1:
but if i add the GridPanel to a Panel and then call ComponentLoader.ToJson it will produce different results as shown bellow:
Result 1:
The difference between the is that the second creates a element that contains the store as show bellow:
"Ext.create("Ext.grid.Panel", [Same script for both situations]);
Any ideas to overcome this problem?
I have 2 GridPanels when i call the method ComponentLoader.ToJason i get the following results when pass them as parameters
Result 1:
{store:{model:Ext.define(Ext.id(), {extend: "Ext.data.Model", fields:[{name:"ID"}],idProperty:"ID" }),storeId:"_str",proxy:{type:"ajax",url:"/Ctrl/Method/",actionMethods:Ext.apply({}, {read:"POST"}, Ext.data.proxy.Ajax.prototype.actionMethods)},remoteSort:true},id:"_grd",height:200,xtype:"grid",region:"center",split:true,iconCls:"#Accept",title:"example",columns:{items:[{id:"ID",dataIndex:"ID",text:"_clnID"}]},viewConfig:{xtype:"gridview"}}
Result2:{store:{model:Ext.define(Ext.id(), {extend: "Ext.data.Model", fields:[{name:"ID"}],idProperty:"ID" }),storeId:"_str",proxy:{type:"ajax",url:"/Ctrl/Method/",actionMethods:Ext.apply({}, {read:"POST"}, Ext.data.proxy.Ajax.prototype.actionMethods)},remoteSort:true},id:"_grd",height:200,xtype:"grid",region:"center",split:true,iconCls:"#Accept",title:"example",columns:{items:[{id:"ID",dataIndex:"ID",text:"_clnID"}]},viewConfig:{xtype:"gridview"}}
and as you can see the results of each call are the samebut if i add the GridPanel to a Panel and then call ComponentLoader.ToJson it will produce different results as shown bellow:
Result 1:
{border:false,xtype:"panel",region:"center",items:[{store:{model:Ext.define(Ext.id(), {extend: "Ext.data.Model", fields:[{name:"ID"}],idProperty:"ID" }),storeId:"_str",proxy:{type:"ajax",url:"/Ctrl/Method/",actionMethods:Ext.apply({}, {read:"POST"}, Ext.data.proxy.Ajax.prototype.actionMethods)},remoteSort:true},id:"_grd",height:200,xtype:"grid",region:"center",split:true,iconCls:"#Accept",title:"example",columns:{items:[{id:"ID",dataIndex:"ID",text:"_clnID"}]},viewConfig:{xtype:"gridview"}}],layout:"border",collapseMode:"header"}
Result 2:{border:false,xtype:"panel",region:"center",items:[Ext.create("Ext.grid.Panel",{store:{model:Ext.define(Ext.id(), {extend: "Ext.data.Model", fields:[{name:"ID"}],idProperty:"ID" }),storeId:"_str",proxy:{type:"ajax",url:"/Ctrl/Method/",actionMethods:Ext.apply({}, {read:"POST"}, Ext.data.proxy.Ajax.prototype.actionMethods)},remoteSort:true},id:"_grd",height:200,xtype:"grid",region:"center",split:true,iconCls:"#Accept",title:"example",columns:{items:[{id:"ID",dataIndex:"ID",text:"_clnID"}]},viewConfig:{xtype:"gridview"}});],layout:"border",collapseMode:"header"}
The first result render properly but the second one is not rendered.The difference between the is that the second creates a element that contains the store as show bellow:
"Ext.create("Ext.grid.Panel", [Same script for both situations]);
Any ideas to overcome this problem?
Last edited by Daniil; Jun 07, 2012 at 12:31 PM.
Reason: [CLOSED]