/** * {@inheritDoc} Sets the require fields and the disallowed fields from the HttpServletRequest. * * @see * org.springframework.web.servlet.mvc.BaseCommandController#initBinder(javax.servlet.http.HttpServletRequest, * org.springframework.web.bind.ServletRequestDataBinder) */ @Override protected void initBinder(final HttpServletRequest request, final ServletRequestDataBinder binder) throws Exception { binder.setRequiredFields( new String[] { "description", "serviceId", "name", "allowedToProxy", "enabled", "ssoEnabled", "anonymousAccess", "evaluationOrder" }); binder.setDisallowedFields(new String[] {"id"}); binder.registerCustomEditor(String.class, new StringTrimmerEditor(true)); }
/** * Initialize the binder with the required fields. * * @param request the request object * @param binder the binder instance */ protected final void initBinder( final HttpServletRequest request, final ServletRequestDataBinder binder) { binder.setRequiredFields("renew"); }