PropertyEditors are used in a few places, but basically they are for converting from String to other types and back again. For example, a date can be represented as a String, and you'd use a property editor to convert it.
This is especially useful in web requests, because the Strings in the web request can be bound directly to your command object (bypassing the need for an object like Struts ActionForms). For example:
Code:
protected void initBinder(HttpServletRequest request,
ServletRequestDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("MMM-yy");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, null,
new CustomDateEditor(dateFormat, true));
}
The best place to look are the reference docs. See Registering additional custom PropertyEditors.