1 /*
2 * ConsoleAction.java
3 *
4 * Created on February 10, 2003, 8:32 AM
5 */
6
7 package com.mlw.fps.controller.console;
8
9 import java.util.Iterator;
10
11 import org.apache.struts.action.ActionForm;
12 import org.apache.struts.action.ActionForward;
13 import org.apache.struts.action.ActionMapping;
14
15 import com.mlw.fps.controller.BaseAction;
16 import com.mlw.fps.model.business.bean.SystemProperties;
17 import com.mlw.fps.view.form.ConsoleForm;
18 import com.mlw.fps.view.manager.ViewManager;
19 /***
20 *
21 * @author Matthew Wilson
22 */
23 public class ConsoleAction extends BaseAction
24 {
25
26 /*** Creates a new instance of ConsoleAction
27 */
28 public ConsoleAction()
29 {
30 }
31
32 public ActionForward executeAction(ActionMapping mapping, ActionForm form, ViewManager manager)
33 {
34 ConsoleForm myForm= (ConsoleForm)form;
35
36 if ("save".equals(myForm.getAction()))
37 {
38 for (Iterator options= myForm.getOptions().keySet().iterator(); options.hasNext();)
39 {
40 String key= (String)options.next();
41 SystemProperties.setProperty(key, (String)myForm.getOption(key));
42 }
43
44 manager.setStyle(SystemProperties.getProperty("css"));
45 }
46
47 if (manager.getConsoleManager().initialized())
48 {
49 return mapping.findForward("welcome");
50 }
51 else
52 {
53 return mapping.findForward("console");
54 }
55 }
56
57 public boolean doInitialization()
58 {
59 return false;
60 }
61 }
This page was automatically generated by Maven