Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] How to programmatically create features with 'auto commit'?

Dear list,
modifying programmatically the layer opens the attached pop-up dialog. Since the modification is done programmatically the user shouldn't bothered with such a dialog. How can I set uDig to "auto commit"?

Code:

FeatureStore fs = layer.getGeoResource().resolve(FeatureStore.class, null);
fs.addFeatures(DataUtilities.collection(features.toArray(new Feature[features.size()])));
MapCommand cmd = EditCommandFactory.getInstance().createCommitCommand();
map.sendCommandSync(cmd);


The command leads to this pop-up dialog and without command the featurestore isn't updated. This is independent from layer.refresh().

Thank you,
Matthias

PNG image


Back to the top