Revision 3996 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/TableEditStopExtension.java
TableEditStopExtension.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig; |
2 | 2 |
|
3 |
import java.io.IOException; |
|
4 |
|
|
3 | 5 |
import com.hardcode.gdbms.engine.data.driver.DriverException; |
4 | 6 |
|
5 | 7 |
import com.iver.andami.PluginServices; |
... | ... | |
28 | 30 |
public void execute(String actionCommand) { |
29 | 31 |
if ("ROLLBACK".equals(actionCommand)) { |
30 | 32 |
View v = PluginServices.getMDIManager().getActiveView(); |
31 |
|
|
32 |
try { |
|
33 |
((Table) v).cancelEditing(); |
|
34 |
} catch (DriverException e) { |
|
35 |
NotificationManager.addError("No se pudo cancelar la edici?n", e); |
|
36 |
} |
|
33 |
try { |
|
34 |
((Table) v).cancelEditing(); |
|
35 |
} catch (IOException e) { |
|
36 |
NotificationManager.addError("No se pudo cancelar la edici?n", e); |
|
37 |
} |
|
37 | 38 |
} else if ("COMMIT".equals(actionCommand)) { |
38 | 39 |
View v = PluginServices.getMDIManager().getActiveView(); |
40 |
((Table) v).stopEditing(); |
|
39 | 41 |
|
40 |
try { |
|
41 |
((Table) v).stopEditing(); |
|
42 |
} catch (DriverException e) { |
|
43 |
NotificationManager.addError("No se pudo guardar la edici?n", e); |
|
44 |
} |
|
45 | 42 |
} |
46 | 43 |
} |
47 | 44 |
|
Also available in: Unified diff