[Users] [MapFish-Users] Grids, checkboxes & feature mediators

Eric Lemoine eric.lemoine at camptocamp.com
Tue Apr 28 23:11:31 CEST 2009


On Tuesday, April 28, 2009, Matt Priour <mpriour at kestrelcomputer.com> wrote:
>
>
>
>
>
> I have an interesting use case and I wanted to know
> if it was possible to to accomplish using GridRowFeatureMediator,
> or another one of the mediator or mixin classes.
>
> I
> will display a grid representing feature attributes which uses a checkbox
> selection model. Each row is connected to an geometry but the information for
> the grid is pulled using non-spatial sql and just has the attributes and record
> ids.
> The
> user's click on a checkbox will initiate a request which will result in that
> feature being added to the map.
> Once
> the feature is added to the map then we want the GridRowFeatureMediator
> behaviour of clicking on a row selects the feature in the map and selecting the
> feature in the map highlights & focuses the row.
>
> If
> all of the records in the grid had an OpenLayers Feature to associate with then
> things are pretty easy, but with only some of the rows having associated
> OpenLayers Features I can't quite see the correct way to do
> this.
>
> I
> am I fine with rolling my own functionality if I have to but am hoping that this
> can be accomplished with pre-existing components.

Hi Matt, have you tried using the GridRowFeatureMediator, it may just
work in your case. If user clicks on a row that doesn't have a
corresponding feature in the layer (id matching) then nothing will
happen, which is what you want. Hmm... the part I'm not sure is that
the GridRowFeatureMediator uses grid.getSelectionModel() which in your
case would be the CheckboxSelectionModel...


>
> Matt
> Priour
> Kestrel Computer Consulting
>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list