I am using Action composition on my Play! applications so far and they have worked perfectly. However, with the recent 2.2.0 update, they no longer work, and I donβt know how to update them correctly.
What is this action, for example:
public class ChatMsgValidation extends Action<ChatMsgValidation.ValidChatMsg> { @With(ChatMsgValidation.class) @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface ValidChatMsg { } public Result call(Http.Context ctx) throws Throwable { Utils.debugFunctionCall("ValidChatMsg() " + ctx.toString());
Now the problem is that the "call" method should return "Promise" instead of "Result", and I cannot find a way to return a simple JSON message without executing a lot of code, useless code, because I'm creating dummy functions to have Promises . There must be a better way that I do not see, please advise.
source share