/** * Initialize a WebDataBinder with {@code @InitBinder} methods. * <p>If the {@code @InitBinder} annotation specifies attributes names, * it is invoked only if the names include the target object name. * @throws Exception if one of the invoked @{@link InitBinder} methods fails * @see #isBinderMethodApplicable */ @Override public void initBinder(WebDataBinder dataBinder, NativeWebRequest request) throws Exception { for (InvocableHandlerMethod binderMethod : this.binderMethods) { if (isBinderMethodApplicable(binderMethod, dataBinder)) { Object returnValue = binderMethod.invokeForRequest(request, null, dataBinder); if (returnValue != null) { throw new IllegalStateException( "@InitBinder methods must not return a value (should be void): " + binderMethod); } } } }
/** * Initialize a WebDataBinder with {@code @InitBinder} methods. * <p>If the {@code @InitBinder} annotation specifies attributes names, * it is invoked only if the names include the target object name. * @throws Exception if one of the invoked @{@link InitBinder} methods fails * @see #isBinderMethodApplicable */ @Override public void initBinder(WebDataBinder dataBinder, NativeWebRequest request) throws Exception { for (InvocableHandlerMethod binderMethod : this.binderMethods) { if (isBinderMethodApplicable(binderMethod, dataBinder)) { Object returnValue = binderMethod.invokeForRequest(request, null, dataBinder); if (returnValue != null) { throw new IllegalStateException( "@InitBinder methods must not return a value (should be void): " + binderMethod); } } } }
/** * Initialize a WebDataBinder with {@code @InitBinder} methods. * <p>If the {@code @InitBinder} annotation specifies attributes names, * it is invoked only if the names include the target object name. * @throws Exception if one of the invoked @{@link InitBinder} methods fails * @see #isBinderMethodApplicable */ @Override public void initBinder(WebDataBinder dataBinder, NativeWebRequest request) throws Exception { for (InvocableHandlerMethod binderMethod : this.binderMethods) { if (isBinderMethodApplicable(binderMethod, dataBinder)) { Object returnValue = binderMethod.invokeForRequest(request, null, dataBinder); if (returnValue != null) { throw new IllegalStateException( "@InitBinder methods must not return a value (should be void): " + binderMethod); } } } }
/** * Initialize a WebDataBinder with {@code @InitBinder} methods. * <p>If the {@code @InitBinder} annotation specifies attributes names, * it is invoked only if the names include the target object name. * @throws Exception if one of the invoked @{@link InitBinder} methods fails * @see #isBinderMethodApplicable */ @Override public void initBinder(WebDataBinder dataBinder, NativeWebRequest request) throws Exception { for (InvocableHandlerMethod binderMethod : this.binderMethods) { if (isBinderMethodApplicable(binderMethod, dataBinder)) { Object returnValue = binderMethod.invokeForRequest(request, null, dataBinder); if (returnValue != null) { throw new IllegalStateException( "@InitBinder methods must not return a value (should be void): " + binderMethod); } } } }