Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Release 1.5.1
-
Fix Version/s: None
-
Component/s: Validation
-
Labels:None
-
Environment:All
Description
It would be extremely helpful to have access to the context or the ActionBean in TypeConverters. This would allow converters to access session-level properties, which could allow developers to extend TypeConverters to domain-level objects that require authentication. Currently all this logic has to be in the ActionBean, which leads to a lot of code duplication.
The converters are passed the locale which already comes straight from the actionBean.actionBeanContext (net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder, line 755).
As it stands the developer has to extend both the DefaultActionBeanPropertyBinder and the DefaultTypeConverterFactory (not the end of the world, certainly, but does go against the Stripes "it-just-works" way of doing things).
I agree, this would be very helpful