You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dfernandez <df...@users.sourceforge.net> on 2009/05/27 18:37:32 UTC

Changing default message of type validation in 1.4


Hello,

I have a form with a input to which I have set type BigDecimal
(setType(BigDecimal.class)), but I want to change the default type
validation message so that it says "'a' is not a valid Number" instead of
"'a' is not a valid BigDecimal.

I have tried setting i18n property "TypeValidator.BigDecimal" and also
"TypeValidator.java.math.BigDecimal", which is the way I thought it was, but
none of them seemed to work... has this changed in 1.4-rc2?

Regards,
Daniel.

-- 
View this message in context: http://www.nabble.com/Changing-default-message-of-type-validation-in-1.4-tp23746191p23746191.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Changing default message of type validation in 1.4

Posted by dfernandez <df...@users.sourceforge.net>.


mgainty wrote:
> 
> 
> //setting properties in classname-conversion.properties
> # syntax: <propertyName>=<converterClassName>
> amount=com.acme.converters.MyCustomBigDecimalConverter
> 
> //assigning a Custom Converter class in xwork-conversion.properties
> # syntax: <type> = <converterClassName>
> java.math.BigDecimal = com.acme.MyBigDecimalConverter
> 
> 

Well, thank you, but... I don't think that in order to change the default
validator message I have to create my own validator, do I?

Regards,
Daniel.

-- 
View this message in context: http://www.nabble.com/Changing-default-message-of-type-validation-in-1.4-tp23746191p23756622.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Changing default message of type validation in 1.4

Posted by Martin Gainty <mg...@hotmail.com>.
//setting properties in classname-conversion.properties
# syntax: <propertyName>=<converterClassName>
amount=com.acme.converters.MyCustomBigDecimalConverter

//assigning a Custom Converter class in xwork-conversion.properties
# syntax: <type> = <converterClassName>
java.math.BigDecimal = com.acme.MyBigDecimalConverterSaludos Cordiales desde EEUU
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Wed, 27 May 2009 09:37:32 -0700
> From: dfernandez@users.sourceforge.net
> To: users@maven.apache.org
> Subject: Changing default message of type validation in 1.4
> 
> 
> 
> Hello,
> 
> I have a form with a input to which I have set type BigDecimal
> (setType(BigDecimal.class)), but I want to change the default type
> validation message so that it says "'a' is not a valid Number" instead of
> "'a' is not a valid BigDecimal.
> 
> I have tried setting i18n property "TypeValidator.BigDecimal" and also
> "TypeValidator.java.math.BigDecimal", which is the way I thought it was, but
> none of them seemed to work... has this changed in 1.4-rc2?
> 
> Regards,
> Daniel.
> 
> -- 
> View this message in context: http://www.nabble.com/Changing-default-message-of-type-validation-in-1.4-tp23746191p23746191.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

_________________________________________________________________
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009

Re: Changing default message of type validation in 1.4

Posted by dfernandez <df...@users.sourceforge.net>.

Ok, my fault (lack of knowledge):

Here it is:

-----------------
IConverter.BigDecimal=Field '${label}' is not a valid number.
-----------------

Regards,
Daniel.
-- 
View this message in context: http://www.nabble.com/Changing-default-message-of-type-validation-in-1.4-tp23746191p23775631.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org