KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > madvoc > girl > GirlAction


1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved.
2

3 package madvoc.girl;
4
5 import jodd.madvoc.meta.MadvocAction;
6 import jodd.madvoc.meta.In;
7 import jodd.madvoc.meta.Out;
8 import jodd.madvoc.meta.InterceptedBy;
9 import jodd.madvoc.interceptor.EchoInterceptor;
10 import jodd.madvoc.interceptor.DefaultMadvocInterceptors;
11 import jodd.petite.meta.PetiteBeanRef;
12
13 import java.util.List JavaDoc;
14
15 @MadvocAction
16 @InterceptedBy({EchoInterceptor.class, DefaultMadvocInterceptors.class})
17 public class GirlAction {
18
19     @PetiteBeanRef
20     GirlManager girlManager;
21
22     @In
23     Girl girl;
24
25     public String JavaDoc add() {
26         System.out.println("GirlAction.add");
27         System.out.println(girlManager);
28         girlManager.add(girl);
29         prepare();
30         return ".list.ok";
31     }
32
33
34     @Out
35     List JavaDoc<Girl> girls;
36
37     public String JavaDoc list() {
38         System.out.println("GirlAction.list");
39         System.out.println(girlManager);
40         prepare();
41         return "ok";
42     }
43
44     private void prepare() {
45         girls = girlManager.getAllGirls();
46     }
47
48 }
49
Popular Tags