KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > form > test > TestActionHandler


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.controller.form.test;
8
9
10 import com.inversoft.verge.mvc.controller.form.FormAction;
11
12
13 /**
14  * <p>
15  * This class is a test action handler
16  * </p>
17  *
18  * @author Brian Pontarelli
19  */

20 public class TestActionHandler {
21
22     public boolean action = false;
23     public boolean mapping = false;
24     public static boolean called = false;
25
26
27     /**
28      * Instantiates a new <code>TestActionHandler</code>
29      */

30     public TestActionHandler() {
31     }
32
33
34     /**
35      * A test handler method
36      */

37     public void handleTestAction(FormAction formEvent) {
38         action = true;
39     }
40
41     /**
42      * A test handler method
43      */

44     public void handleTestAction1(FormAction formEvent) {
45         action = true;
46     }
47
48     /**
49      * A test handler method
50      */

51     public void handleAction1(FormAction formEvent) {
52         action = true;
53         called = true;
54     }
55
56     /**
57      * A test handler method
58      */

59     public String JavaDoc handleTestMapping(FormAction formEvent) {
60         mapping = true;
61         return "form1mapping1";
62     }
63
64     /**
65      * A test handler method
66      */

67     public String JavaDoc handleTestMapping6(FormAction formEvent) {
68         mapping = true;
69         return "form1mapping5";
70     }
71
72     /**
73      * A test handler method
74      */

75     public Object JavaDoc handleTestDisabled(FormAction formEvent) {
76         return null;
77     }
78
79     /**
80      * A test handler method for testing global actions and mappings
81      */

82     public String JavaDoc handleGlobalAction1(FormAction action) {
83         //System.out.println("Inside global action handle method");
84
return "globalMapping1";
85     }
86
87     /**
88      * A test handler method for testing global actions and mappings
89      */

90     public String JavaDoc handleGlobalAction2(FormAction action) {
91         return "globalMapping2";
92     }
93 }
Popular Tags