[Users] GeoExt.data.WMSCapabilitiesStore question

geographika geographika at gmail.com
Fri Nov 19 12:16:07 CET 2010


Hi,

Do you definitely have a "name" property on your records (I think this 
is a default but worth checking)? You have a "title" defined in your 
grid columns, so maybe try filtering with this as a test.
Try removing the autoLoad: true, and loading the store manually with 
Temp_grid.load() then apply the filter.
Also I have not done this myself with the WMS store so keep in mind it 
may not be the best approach.

Regards,

Seth


On 19/11/2010 10:16, Evans, Barry wrote:
>
> Thank you geographika, I've looked through the code on the link and 
> tried to implement it to only show data for one group (in this 
> instance 'groupA') but I'm still getting the data of all groups shown. 
> Below is an example of my code for the grid. When I try to implement 
> this the grid still shows data for groupA, groupB, and groupC. I 
> apologise for asking for further help, I am not familiar with Ext and 
> web based programming is still relatively new for me. I assume that I 
> am not implementing the filter method in the right way and guess I may 
> require a listener or something along those lines. Could you or 
> someone have a quick look at my sample of code to see if you can see 
> the immediate problem?
>
> Kind regards,
>
> Barry
>
> Temp_grid = *new*GeoExt.data.WMSCapabilitiesStore({
>
> url:"http://localhost:8080/geoserver/ows?SERVICE=WMS&REQUEST=GetCapabilities&namespace=cite",
>
> autoLoad:true
>
> });
>
> Temp_grid.filter('name','groupA',true,true);
>
> *var*grid=*new*Ext.grid.GridPanel({
>
> height:150,
>
> width:200,
>
> renderTo:'capgrid',
>
> viewConfig:{forceFit:true},
>
> //wms store went here before
>
> store:Temp_grid,
>
> columns:[{header:"Name",dataIndex:"title",sortable:true}]});
>
> *From:*users-bounces at geoext.org [mailto:users-bounces at geoext.org] *On 
> Behalf Of *geographika
> *Sent:* 18 November 2010 12:08
> *To:* users at geoext.org
> *Subject:* Re: [Users] GeoExt.data.WMSCapabilitiesStore question
>
> There is a filter property on the store class from which 
> GeoExt.data.WMSCapabilitiesStore inherits.
>
> http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.Store
>
>
> On 18/11/2010 12:05, Evans, Barry wrote:
>
> Hi there,
>
> I am using  the GeoExt.data.WMSCapabilitiesStore to display layer data 
> contained within a namespace. The problem I have is that I now have 
> too many layers within the grid which will overwhelm the user. Is it 
> possible to apply a filter to the grid so that a user can only see 
> layers, that for instance have a specific unique user ID? I see a 
> similar feature in the layertree example in the geoext documentation 
> and which is shown below but I cannot figure out similar process for 
> grid panel.
>
> Kind regards,
>
> Barry
>
> Email: be208 at exeter.ac.uk <mailto:be208 at exeter.ac.uk>
>
> Layertree filter example
>
> loader: {
>
>         filter: function(record) {
>
>             return record.get("layer").name.indexOf("Tasmania") !== -1
>
>         }
>
>     }
>
>   
>   
> _______________________________________________
> Users mailing list
> Users at geoext.org  <mailto:Users at geoext.org>
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> 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/20101119/dbe339d9/attachment-0001.htm 


More information about the Users mailing list