public void findAll(ActionRequest request, ActionResponse response) {
    List<?> all = DynMessage.all().order("createdOn").fetch();

    response.setData(all);

    response.setOffset(0);
    response.setTotal(all.size());
    response.setStatus(Response.STATUS_SUCCESS);
  }
  public void sendReply(ActionRequest request, ActionResponse response) {

    DynMessage ctx = request.getContext().asType(DynMessage.class);

    DynMessage reply = new DynMessage();
    reply.setSubject(ctx.getSubject());
    reply.setBody((String) request.getContext().get("reply"));

    reply = service.sendMessage(ctx, reply);

    // send a view specific signal
    response.setSignal("trail:record", reply);

    response.setValue("reply", null); // clear reply field
    response.setValue("canReply", false); // close reply field

    response.setStatus(ActionResponse.STATUS_SUCCESS);
  }