[Users] I can not work with two simultaneously gridpanel based on GeoExt.data.FeatureStore within differents windows

Christian Mayer mayer at terrestris.de
Thu Sep 20 20:18:45 CEST 2012


Hi Jose,

just a little hint: Maybe the problem is that you pass the same id to 
your windows. This could cause some issues.

Best regards,
Chris

Am 08.08.2012 12:56, schrieb jcortega at dipalme.org:
> Hi,
>
> When I add one second ext gridPanel (gridPanelrs)  based on 
> GeoExt.data.FeatureStore  in a new window does not work for the first 
>  gridPanel (gridPanelmu), exactly it dissapears the data of the first 
> grdPanel
> My code is:
>
> storemu = new GeoExt.data.FeatureStore({
>           layer: vectorLayer,
>           fields: fieldsmu,
>           proxy: new GeoExt.data.ProtocolProxy({
>   protocol: new OpenLayers.Protocol.HTTP({
>           url: 
> "app/lib/app/postgis_geojson.php?geotable=eiel_map_municipal.municipios_sde&orderby=nombre",
>           format: new OpenLayers.Format.GeoJSON()
>   })
>   })
>
>           //  autoLoad: true
>   });
>
>   storemu.load({
>           params: {municipio: municipioseleccionado, order_by:ordenapor}
>           });
>
>         var filtemu = new Ext.ux.grid.GridFilters({filters:columnsmu});
>   var selectormu = new GeoExt.grid.FeatureSelectionModel();
>         var gridPanelmu =  new Ext.grid.GridPanel({
>         ref: "gridPanelmu",
>   id: "gridPanelmu",
>   title: 'municipios',
>         region: "east",
>         store: storemu,
>   plugins: filtemu,
>         // store: ['abla','04001'],
>   stripeRows: true,
>         tbar: [],
>   width: 400,
>   height: 600,
>         columns: columnsmu,
>         sm: selectormu
>        });
>
> var  myWinalfamu = new Ext.Window({
>           id     : capa,
>           height : 400,
>           width  : 500,
>           closeAction: "close",  // hide esto evita un error al abrir 
> por segunda vez la ventana "me.dom error"
>           resizable: true,
>           items  : [gridPanelmu]// los corchetes tiene que estar 
> porque si no, no salen los datos
>    });
>
>            myWinalfamu.show();
>
>
> The second store, gridPanel and window is practical the same code but 
> changing the names:
>
> storers = new GeoExt.data.FeatureStore({
>           layer: vectorLayer,
>           fields: fieldsrs,
>           proxy: new GeoExt.data.ProtocolProxy({
>   protocol: new OpenLayers.Protocol.HTTP({
>           url: 
> "app/lib/app/postgis_geojson.php?geotable=eiel_map_municipal.ramal_saneamiento&orderby=ord_tramo&municipio=municipioseleccionado",
>           format: new OpenLayers.Format.GeoJSON()
>   })
>   })
>
>           //  autoLoad: true
>   });
>
>   storers.load({
>           params: {municipio: municipioseleccionado, order_by:ordenapor}
>           });
>
>
>
>         var filters = new Ext.ux.grid.GridFilters({filters:columnsrs});
>         var selectorrs = new GeoExt.grid.FeatureSelectionModel();
>         var gridPanelrs =  new Ext.grid.GridPanel({
>         ref: "gridPanelrs",
>   id: "gridPanelrs",
>   title: 'redes_saneamiento',
>         region: "east",
>         store: storers,
>   plugins: filters,
>         // store: ['abla','04001'],
>   stripeRows: true,
>         tbar: [],
>   width: 400,
>   height: 600,
>         columns: columnsrs,
>         sm:  selectorrs
>        });
>
> var myWinalfars = new Ext.Window({
>           id     : capa,
>           height : 400,
>           width  : 500,
>           closeAction: "close",  // hide esto evita un error al abrir 
> por segunda vez la ventana "me.dom error"
>           resizable: true,
>           items  : [gridPanelrs]// los corchetes tiene que estar 
> porque si no, no salen los datos
>    });
>
>            myWinalfars.show();
>
>
>
>
> Best regards,
> Jose Carlos
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120920/229d12c6/attachment-0001.htm 


More information about the Users mailing list