The Play! documentation indicates that @Before filters cascade to child class controllers (ref).
Let's say I have:
public class BaseController extends Controller {
@Before(only={"show"})
public static void check() {
Logger.info("checking...");
}
}
public class Users extends BaseController {
public static void show(Long id) {
}
}
When Users#show is called, I expect "checking..." to be displayed, but it does not. Moving the @Before filter into the Users class displays the message. Removing the only modifier also result in the message being displayed.
Why doesn't the only modifier cascade along with the @Before filter?