I did not know that. Nearly 5 years of using stripes, you think I would know that by now. errors.add(new LocalizableError("validation.expression.valueFailedExpression")); is working fine.
But yeah, the current action bean instance would be a great addition. http://www.stripesframework.org/jira/browse/STS-701 looks like what I'm getting at. Perhaps a simple StripesFilter.getCurrentActionBean() or something like that might be a possibility as opposed to changing old interface signatures. Thanks Freddy -----Original Message----- From: Freddy Daoud [mailto:xf2...@fastmail.fm] Sent: Thursday, June 23, 2011 1:27 PM To: stripes-users@lists.sourceforge.net Subject: Re: [Stripes-users] TypeConverter API - can I get the current field name? Hi John, The type converter doesn't need to be given the field name. The field name is automatically provided as the {0} parameter when constructing the error message from the resource bundle, and {1} the value entered by the user. Ideally you use a ScopedLocalizableError, so that the user of your type converter can make good use of the lookup strategy to organize resource bundle keys. I agree that it would be useful for the type converter to be given more context. Perhaps just the ActionBean, because from there you can get the ActionBeanContext, then the request, response, session, ... Cheers, Freddy ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users