2526272829303132
public class ClassNameController { @Action public View sayHello(@Param("name") String name) { return new HTMLPage() .withH2Content("classNameControllerAction:" + name); }
5051525354555657
} @Action("do-something") public View doSomething() { return new HTMLPage() .withH2Content("test"); }
6162636465666768
afterInvokeCount++; } @DefaultAction public View defaultAction() { return new HTMLPage() .withH2Content("default"); }
*/ public abstract class AbstractController { @Action("test") public View testInitAction() { return new HTMLPage() .withH2Content(getVal()); }
5657585960616263
} @Action public View doSomething() { return new HTMLPage() .withH2Content("redirecting2"); }
6263646566676869
} @Action public View doSomething() { return new HTMLPage() .withH2Content("streaming3"); }
38394041424344
private String someStatefulVar; @DefaultAction public View defaultAction() { return new HTMLPage(); }
4344454647484950
return new HTMLPage(); } @Action("some-action") public View someAction() { return new HTMLPage() .withH1Content("some-singleton/some-action"); }
5152535455565758
@Action("set-var") public View setVarAction(@Param("var") String var) { someStatefulVar = var; return new HTMLPage() .withH1Content("some-singleton/set-var"); }
5859606162636465
} @Action("get-var") public View getVarAction() { return new HTMLPage() .withH2Content(someStatefulVar); }