Hi Flavio, to save data in gvSIG it's necessary to close edition. When NT is open on a non-editing layer, saving implies opening edition, making data changes and finally closing edition. This behavior is completely safe: navtable only saves its own changes.
But with an editing layer it isn't save anymore. Saving changes implies saving every change made since the user has opened edition, included gvSIG's data table or even CAD changes. In order to avoid unexpected behavior at saving, we disabled the button if the layer is already in editing mode. BTW, this is gvSIG's data table behavior. There was a discussion about this topic on gvSIG Spanish user list [1] (I'm sorry we didn't use international list...) and on the bug in the tracker [2]. I hope I've explained it well... best, Javi [1] http://osgeo-org.1803224.n2.nabble.com/Pregunta-abierta-sobre-el-funcionamiento-de-NavTable-td6003342.html [2] http://forge.osor.eu/tracker/index.php?func=detail&aid=15000&group_id=122&atid=462 2011/7/7 Flavio Pompermaier <[email protected]>: > Hi to all, I'd like to know why in the NavTable the saveButton could > be enabled only when a layer is not in editing..is there any > particular reason? > Below there's the relative code: > > protected void enableSaveButton(boolean bool) { > if (layer != null && layer.isEditing()) { > saveB.setEnabled(false); > } else if (!isChangedValues()) { > saveB.setEnabled(false); > } else { > saveB.setEnabled(bool); > } > } > > Best regards, > Flavio > _______________________________________________ > Navtable-devel mailing list > [email protected] > https://lists.forge.osor.eu/listinfo/navtable-devel > -- Javier Estévez Valiñas segmentation fault: http://valdaris.com/ 100 pixels: http://pixel.valdaris.com/ ghandalf: http://www.ghandalf.org/ _______________________________________________ Navtable-devel mailing list [email protected] https://lists.forge.osor.eu/listinfo/navtable-devel
