Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] using transaction manager

Sorry for trashing mailinglist. :)

Hi, i am doing some attrributes viewer of a layer, and i would like to edit
those attributes. 

I wanted to say that i do like this 
src -FetatureSource
eManager - EditManager of layer 
filter- filter of type FidFilter with the FID of feature i want to edit
Layer - layer of map i want to edit

This code is placed somewhere in the ICellModifier.modify

Feature feature=src.getDataStore().getFeatureReader(new DefaultQuery(src.getSchema().getTypeName(),filter),eManager.getTransaction).next();

eManager.setEditFeature(feature,Layer);
feature.setAttribute(column,newValue);

and in the end i do like this

eManager.commitTransaction();

and the changes isn't saved. 

if i do "eManager.commitTransaction();" just after i make the changes everything
works fine.

What am i doing wrong, is there any sample how to use transaction?

Thank you.
--
http://www.freemail.lt/


Back to the top