[Users] AttributeForm - how does it work

Alexandre Dube adube at mapgears.com
Thu Feb 10 15:06:53 CET 2011


Hi Eric,

   Thanks for the explanation.

   I didn't remember about the FeatureEditorGrid ux.  You're right, it 
could be a nice pick.  It requires to be created on each feature select 
though, and to my eye that seems like a lot of unnecessary process.  
Since all features from a same layer have the same attributes, it seems 
unnecessary having to recreate the store / grid all the time.  Some kind 
of manual feature binding could be done, and methods to load the current 
state of a feature's attribute to the form and vice-versa could be 
nice.  I'm not sure where or how this could be implemented though...

   I'll look deeper and try to find out what could be the best solution 
for me to use / create.

   Thanks again,

Alexandre


On 11-02-10 01:33 AM, Eric Lemoine wrote:
> 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.
>


-- 
Alexandre Dubé
Mapgears
www.mapgears.com



More information about the Users mailing list