Databinding a StructuredPropertyEditor specific to type and target in Spring(Grails) - Selective app

Posted by Colin Harrington on Stack Overflow See other posts from Stack Overflow or by Colin Harrington
Published on 2010-04-07T01:41:05Z Indexed on 2010/04/07 1:43 UTC
Read the original article Hit count: 352

Filed under:
|
|

Using Grails 1.2.2, I'm working on binding a structured property (CC expiration Date) to a java.util.Date but only for specific Domain and Commands objects.

I've found the StructuredPropertyEditor interface, but the only way that I've found to register it is to use the PropertyEditorRegistrar and register the editor for the java.util.Date class (much like this example)

I don't want all of my dates to use my custom StructuredPropertyEditor. How do I apply the StructuredPropertyEditor selectively to specific targets like certain Command & Domain Classes?

© Stack Overflow or respective owner

Related posts about grails

Related posts about spring