6162636465666768
afterInvokeCount++; } @DefaultAction public View defaultAction() { return new HTMLPage() .withH2Content("default"); }
2526272829303132
*/ 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); }
7879808182838485
Long ts = (Long)request.getAttribute("ts"); if (ts == null) { ts = System.currentTimeMillis(); request.setAttribute("ts", ts); } return new HTMLPage() .withH2Content(String.valueOf(ts)); }
8586878889909192
} @Action("get-inj") public View getInjAction() { return new HTMLPage() .withH2Content(Integer.toHexString(System.identityHashCode(someService))); }