5657585960616263
} @Action("expects/json") @Expects("application/json") public View expectJSON(@Entity SimplePojo pojo) { return new HTMLPage() .withH2Content(pojo.getVal()); }
6364656667686970
} @Action("expects/xml") @Expects("application/xml") public View expectXML(@Entity SimplePojo pojo) { return new HTMLPage() .withH2Content(pojo.getVal()); }
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); }