1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.seasar.cubby.internal.util;
18
19 import org.seasar.cubby.action.Action;
20 import org.seasar.cubby.action.ActionResult;
21 import org.seasar.cubby.action.Form;
22 import org.seasar.cubby.action.Forward;
23 import org.seasar.cubby.action.Path;
24 import org.seasar.cubby.action.Redirect;
25 import org.seasar.cubby.action.Validation;
26 import org.seasar.cubby.validator.DefaultValidationRules;
27 import org.seasar.cubby.validator.ValidationRules;
28
29 @Path("/")
30 public class MockAction extends Action {
31
32 public ValidationRules validation = new DefaultValidationRules() {
33
34 @Override
35 protected void initialize() {
36 }
37
38 };
39
40 public String attr1;
41 public String attr2;
42 public String attr3;
43 public boolean executedInitalizeMethod = false;
44 public boolean executedPrerenderMethod = false;
45
46 @Override
47 public void initialize() {
48 super.initialize();
49 executedInitalizeMethod = true;
50 }
51
52 @Override
53 public void prerender() {
54 super.prerender();
55 executedPrerenderMethod = true;
56 }
57
58 @Validation(errorPage="error.jsp", rules="validation1")
59 @Form
60 public ActionResult dummy1() {
61 return new Forward("dummy1.jsp");
62 }
63
64 public ActionResult dummy2() {
65 return new Redirect("dummy2");
66 }
67
68 @Validation(errorPage="error.jsp", rules="validation2")
69 @Form
70 public ActionResult dummy3() {
71 return new Forward("dummy1.jsp");
72 }
73
74 @Form
75 public ActionResult index() {
76 return new Forward("dummy1.jsp");
77 }
78
79 @Path("todo/lists")
80 public ActionResult todolist() {
81 return new Forward("dummy1.jsp");
82 }
83
84 @Path("/tasklists")
85 public ActionResult tasklist() {
86 return new Forward("dummy1.jsp");
87 }
88 }