okay but I dont understand the 'some value that will never exist', it's 
just for do not display accessions on the map?
I have I idea: it's possible to load the accession layer in a store to 
display attributs in gridpanel and dont display the layer on the map?
With this I think I can make a link beetween the site layer an the 
accession store (when I click on a site, i select the accession when the 
site_id its equal to accession_site_id).

Charles Galpin a écrit :
> François, I did something similar to this. You need multiple layers, one for 
> each kind of data. So a sites layer that you will load into the gridpanel, 
> and  to start, an accession layer. On the accession layer you need to add a 
> filter, initially with some filter that will cause no data to load, something 
> like
>
> filter: new OpenLayers.Filter.Comparison({
>                     type: OpenLayers.Filter.Comparison.EQUAL_TO,
>                     property: "some attribute",
>                     value: "some value that will never exist"
>                 })
>
> And likely a feature store for this layer too.
>
> Now on your gridPanel you needd to add an event handler for 'rowselect' and 
> in this handler, change the  accession layer filter to use some data from the 
> site layer to filter for accessions for that layer. Something like
>
> sitePanel.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
>                 var feature = r.data.feature;
>                 accessionLayer.filter = new OpenLayers.Filter.Comparison({
>                     type: OpenLayers.Filter.Comparison.EQUAL_TO,
>                     property: "some attribute",
>                     value: r.data.some_matching_attribute
>                 });
>                 accessionLayer.refresh();
>             });
>
> Then the layer will populate and if you have it bound to the map or another 
> grid or something it will populate.
>
> You can do similar things when they click on an accession say. If you look at 
> the demos for geoext and openlayers you'll find hints how to do these things.
>
> hth,
> charles
>
>
> On May 19, 2010, at 4:33 AM, François Boussuges wrote:
>
>   
>> Hello.
>>
>> I have a problem in the conception of my application (oracle+ geoserver+ 
>> geoext).
>>
>> I have a database with:
>>
>> -sites: a lots of site with lon/lat.
>> -accession: accession is an object on the site, one site can have 
>> several accession (ex: the site DBS33562 have 8 accessions)
>> -a lots of attributs : each type of accession (the type is : grapfruit, 
>> corn, vegetables...) have a lot of attributs (ex: for the grapfruit: 
>> color of the fruits...).
>>
>> In m'y map i need to see each accession and this attributs when I click 
>> on a site.
>>
>> I think to solutions:
>>
>> -display the site but i don't know how to display more than one 
>> accession by site (I'm in training).
>> -display each accession individually but I have a lot of points with 
>> same coordinate (lon/lat).
>>
>>
>> How do you think about this? what is the solution to my problem?
>> If I want to display a Gridpanel with my accession when I click on a 
>> site what should I do?
>>
>> With my best regards.
>>
>> François
>> ______________________________________________
>>     
>
>   

_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to