8182838485868788
for (int i = 0; i < vals.length; i++) { sb.append(vals[i]); if (i+1 < vals.length) sb.append(","); } return new HTMLPage() .withH2Content(sb.toString()); }
121122123124125126127128
@Action("expects") @ParamPath("plaintext/pojo/with/params") @Expects("text/plain") public View expectPlainTextWithPojoWithParams(@Entity SimplePojo pojo, @Param("p1") String p1) { return new HTMLPage() .withH2Content(p1 + ", " + pojo.getVal()); }
8283848586878889
} @Action("test-init") public View testInitAction() { return new HTMLPage() .withH2Content("index/test-init " + initVal); }
8990919293949596
} @DefaultAction public View defaultActn() { return new HTMLPage() .withH2Content(reqCtxCntrl + ":" + reqCtxActn); }
96979899100101102103
} @Action("test") public View testAction() { return new HTMLPage() .withH1Content("index/test"); }
103104105106107108109110
} @Action("with-param") public View withParamAction() { return new HTMLPage() .withH2Content("index/with-param " + getParameter("var")); }
110111112113114115116117
} @Action("another-param") public View anotherParamAction() { return new HTMLPage() .withH2Content("index/another-param " + getParameter("var")); }
119120121122123124125126
@Action("some-service") public View someServiceAction() { String answer = someService.answerRequest(getParameter("var")); return new HTMLPage() .withH2Content("index/some-service " + answer); }
128129130131132133134135
@Action("some-provided-service") public View someProvidedServiceAction(@Param("var") String var) { String processed = someProvidedService.processRequest(var); return new HTMLPage() .withH2Content(processed); }
135136137138139140141142
} @Action("test-annotation") public View doAnnotationTest() { return new HTMLPage() .withH2Content("index/test-annotation " + getParameter("var")); }