1 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 java.util.Iterator ; 15 16 import javax.swing.JOptionPane ; 17 18 26 public class SaveAllProductAction extends AbstractVAIBuilderAction { 27 28 31 public SaveAllProductAction() { 32 super(); 33 } 34 35 38 public void runnit() { 39 40 Iterator iterator = getController().getProductControllerList().values().iterator(); 41 while (iterator.hasNext() == true) { 42 VAIProductController productController = (VAIProductController)iterator.next(); 43 if (productController.isDirty() == true) { 44 try { 45 productController.getModel().save(); 46 } catch (VAIBuilderException exc) { 47 JOptionPane.showMessageDialog(getController().getFrame(), 48 exc.getMessageAsHtml(), 49 VAGlobals.NAME, 50 JOptionPane.ERROR_MESSAGE); 51 } 52 } 53 } 54 55 } 56 } 57 | Popular Tags |