[Users] AttributeForm - how does it work
Eric Lemoine
eric.lemoine at camptocamp.com
Thu Feb 10 07:33:26 CET 2011
On Wednesday, February 9, 2011, Alexandre Dube <adube at mapgears.com> wrote:
> If I may add :
>
> I create the form empty (without any "feature" property set). Is it
> possible to use one store per layer and bind the form a feature only
> when selected and unbind after it has been unselected or do I need so
> specify a unique store per feature everytime ?
Hi Alexandre,
To work with per-layer attribute stores you'll need to be able to
rebind an attribute store to a new feature. AttributeStore doesn't
support that currently. So I think the easiest would be to create a
new form each time a feature is selected for modification. But still,
I think that, when creating the form, the fields values won't be
automatically set based on the values of the attribute records. And
when the user changes a value in the form the change won't
automatically propagate to the corresponding attribute record (and
feature). You'll have to do all this manually. Have you considered
using the FeatureEditorGrid extension? It will do all this sync work
for you, and it works pretty well.
--
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