Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:None
Description
TypeConverters and Formatters should be able to be configured in web.xml. Since both interfaces take a generic type parameter, Stripes should be able to use that type parameter to register the converter or formatter with the default implementations of TypeConverterFactory and FormatterFactory.
I have been considering this for a while.
Can't we use annotation for that?
For example:
@TypeConverterFor(Date.class)
{...}public class MyDateTypeConverter implements TypeConverter
@FormatterFor(MyOrder.class)
public class MyOrderFormatter implements Formatter{...}
This might be a topic which should be explained on the wiki if it can be achieved by extending the default factories.
Just an idea...