Class WmIdPropertyEditor

  • All Implemented Interfaces:
    PropertyEditor

    public class WmIdPropertyEditor
    extends PropertyEditorSupport
    This class represents a generic property editor for WmIds. It provides an editor for all classes that implement the WmId interface. The property editor invokes the EntityManager in order to transform a String to a WmId. Therefore the EntityManager is input parameter of the constructor of this property editor.Add this property editor in your initBinder method. For example to define a property editor for the language: public void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { super.initBinder(request, binder); // Register basic property editors binder.registerCustomEditor(Language.class, new WmIdPropertyEditor(myEntityManager)); }
    Author:
    bartk