From what I understand of Action composition, we can wrap multiple action classes around an action class so that the wrapped classes are called first before the action action class
so, for eg:
@With(a.class, b.class)
public static Result index() {
return ok("It works!");
}
public static Result logout(){
session().clear();
}
Any call to index will first go through the call() methods of a & b. The key thing here is that at some point of time, the control needs to be delegated to the index() method.
My question is; is it possible to change the call from index to logout in either a or b.
I tried calling controller.Application.logout() instead of delegate.call but the logout method doesnt get a handle on the context. Any ideas?