use of org.broadleafcommerce.openadmin.web.editor.NonNullBooleanEditor in project BroadleafCommerce by BroadleafCommerce.
the class AdminBasicEntityController method initBinder.
// *********************************
// ADDITIONAL SPRING-BOUND METHODS *
// *********************************
/**
* Invoked on every request to provide the ability to register specific binders for Spring's binding process.
* By default, we register a binder that treats empty Strings as null and a Boolean editor that supports either true
* or false. If the value is passed in as null, it will treat it as false.
*
* @param binder
*/
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.registerCustomEditor(String.class, new StringTrimmerEditor(true));
binder.registerCustomEditor(Boolean.class, new NonNullBooleanEditor());
}
Aggregations