KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > memoire > vainstall > builder > action > SaveProductAction


1 /*
2  * $RCSfile: SaveProductAction.java,v $
3  * @modification $Date: 2001/09/28 19:31:19 $
4  * @version $Id: SaveProductAction.java,v 1.1 2001/09/28 19:31:19 hfalk Exp $
5  *
6  */

7
8 package com.memoire.vainstall.builder.action;
9
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 JavaDoc;
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().getActiveProductController();
38
39         try {
40             productController.getModel().save();
41         } catch (VAIBuilderException exc) {
42            JOptionPane.showMessageDialog(getController().getFrame(),
43            exc.getMessageAsHtml(),
44            VAGlobals.NAME,
45            JOptionPane.ERROR_MESSAGE);
46         }
47
48     }
49 }
50
Popular Tags