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@geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to