struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Custom error message per converter
Date Thu, 23 May 2013 13:01:22 GMT
Could you show source code of your DateConverter?


Regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/


2013/5/23 Alfredo Manuel Osorio Martinez <alfredo.osorio@afirme.com>:
> Hello,
>
> Is it possible to configure a custom error message per converter?
>
> For example I have this in my xwork-conversion.properties:
> java.util.Date=mx.com.afirme.midas2.converter.DateConverter
>
> Whenever a Date conversion fails in any action I'd like to show a message like this:
> Incorrect format, expected mm/dd/yyyy
>
> I don't want to define a custom message per property as mentioned in the documentation:
> http://struts.apache.org/release/2.3.x/docs/type-conversion.html
>
> "However, sometimes you may wish to override this message on a per-field basis. You can
do this by adding an i18n key associated with just your action (Action.properties) using the
pattern invalid.fieldvalue.xxx, where xxx is the field name."
>
>
> Alfredo Osorio
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message