01: /*
02: * $RCSfile: SaveProductAction.java,v $
03: * @modification $Date: 2001/09/28 19:31:19 $
04: * @version $Id: SaveProductAction.java,v 1.1 2001/09/28 19:31:19 hfalk Exp $
05: *
06: */
07:
08: package com.memoire.vainstall.builder.action;
09:
10: import com.memoire.vainstall.VAGlobals;
11: import com.memoire.vainstall.builder.*;
12: import com.memoire.vainstall.builder.util.*;
13:
14: import javax.swing.JOptionPane;
15:
16: /**
17: * This action saves the active product which are beeing edited
18: *
19: * @see com.memoire.vainstall.builder.util.AbstractVAIBuilderAction
20: *
21: * @author Henrik Falk
22: * @version $Id: SaveProductAction.java,v 1.1 2001/09/28 19:31:19 hfalk Exp $
23: */
24: public class SaveProductAction extends AbstractVAIBuilderAction {
25:
26: /**
27: * Default constructor
28: */
29: public SaveProductAction() {
30: super ();
31: }
32:
33: /**
34: * Implements the runnit method
35: */
36: public void runnit() {
37: VAIProductController productController = getController()
38: .getActiveProductController();
39:
40: try {
41: productController.getModel().save();
42: } catch (VAIBuilderException exc) {
43: JOptionPane.showMessageDialog(getController().getFrame(),
44: exc.getMessageAsHtml(), VAGlobals.NAME,
45: JOptionPane.ERROR_MESSAGE);
46: }
47:
48: }
49: }
|