How to access command objects from filter and is it possible at all?
问题 I often write something like: def myAction{ MyActionCommand cmd -> if( cmd.hasErrors() ){ return render(status:HttpServletResponse.SC_BAD_REQUEST ); }else{ // actual action logic } So, I'd like to extract that common pattern into some reusable location. Filter looks like good candidate, but I can't find the way to get command object from the filter. Tryed something like this (in filters closure): formValidation( controller:'*', action:'*' ){ before = { cmd -> if( cmd.hasErrors() ){ response