96979899100101102103
Long ts = (Long)request.getAttribute("ts"); if (ts == null) { ts = System.currentTimeMillis(); request.setAttribute("ts", ts); } return new HTMLPage() .withH2Content(String.valueOf(ts)); }
103104105106107108109110
} @Action("get-inj") public View getInjAction() { return new HTMLPage() .withH2Content(Integer.toHexString(System.identityHashCode(someService))); }
5657585960616263
if (!"beforectx2".equals(controller)) { throw new RuntimeException("controller incorrect"); } SomeForm form = (SomeForm) parameters[0]; return new HTMLPage() .withH2Content(form.getUserName() + " " + form.getPassword()); }
63646566676869
} @Action("index") public View someAction(@Model SomeForm form) { return new HTMLPage(); }
5455565758596061
String controller = ctx.getController(); if (!"beforectx".equals(controller)) { throw new RuntimeException("controller incorrect"); } return new HTMLPage() .withH2Content(String.valueOf(parameters[0])); }
61626364656667
} @Action("index") public View someAction(@Param("p1") String name) { return new HTMLPage(); }
4243444546474849
} @Action("expects/plaintext/string") @Expects("text/plain") public View expectPlainTextWithString(@Entity String name) { return new HTMLPage() .withH2Content(name); }
4950515253545556
} @Action("expects/plaintext/pojo") @Expects("text/plain") public View expectPlainTextWithPojo(@Entity SimplePojo pojo) { return new HTMLPage() .withH2Content(pojo.getVal()); }
} @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()); }