[udig-devel] setting field values of a new feature

Jesse Eichar jeichar at refractions.net
Thu Oct 4 13:19:54 PDT 2007


This is a really good question.  There is not API in Geotools to get  
the newly created features.  However in uDig, the edit feature (in  
the EditManager) should be set when a new feature is created and  
accepted.  By accepted I mean that the user has completed the feature  
and pressed enter or double clicked.

So register a listener with the EditManager and listen for Edit  
Feature events.  But be warned this is also called when a feature is  
selected for editing.  So you'll have to think about how to deal with  
that as well.

Jesse

On Oct 3, 2007, at 2:29 AM, Piebe de Vries wrote:

> Hi,
>
> I was hoping that somebody could point me in the right direction.
> I am making an application based on uDig. It contains a WFS layer.  
> If the user adds a new feature to this layer,  the values of some  
> of the fields in this new feature need to be set to some specific  
> values (which are determined runtime).  Which event/extension point  
> can be used to accomplish this. (I was looking at the  
> editFeatureChanged event, but this seemed to be triggered only for  
> existing features?)
>
> Thanks,
> Piebe
>
>
>
>
> -- 
> ---------------------------	----------------------------
>  Piebe de Vries		  piebe.de.vries at geodan.nl
>  Geodan IT b.v.		  Tel: +31 (0)73 - 6925 151
>  President Kennedylaan 1	  Fax: +31 (0)73 - 5711 333
>  1079 MB Amsterdam (NL)	  http://www.geodan.nl
> ---------------------------	----------------------------
>
>
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



More information about the udig-devel mailing list