If you define a message in StripesResources.properties with the key:
        package.actionClass.fieldName.errorMessage (if you're using Stripes  
1.5)
or      url.fieldName.errorMessage (if you're using Stripes 1.4)

then that message will be used in preference.  Stripes will still  
generate two messages in the backend, but when it goes to display  
them if the message text is identical it will display only one message.

-t

On Jun 12, 2008, at 8:04 AM, SivaKumarl wrote:

>
> Hi Marijan,
>
>           Thank you for your reply,displaying text is not my problem,
> instead two error Messages(one message is coming for datatype  
> validation and
> another is for mask validation) i have to display only one message  
> this is
> my actual  problem.
>
> Cheers,
> ------
> Siva
>
>
>
> marijan milicevic wrote:
>>
>> Hi Siva,
>>
>> you can change:
>> "converter.number.invalidNumber" property within your  
>> Stripes.properties.
>>
>> I believe that's the one that is used in your case,
>> -m
>>
>>
>>
>>
>>
>> SivaKumarl wrote:
>>> Hi friends ,
>>>
>>>            I have field "amount" of type int which was annotated  
>>> using
>>> @validate with required,mask and maxlengh.When ever string value is
>>> entered
>>> in text it displaying two error messages,one is for data type  
>>> validation
>>> and
>>> another is for mask here i want to display only one error message  
>>> instead
>>> of
>>> two.please tell me how to display only one message with out using
>>> @validatemethod.
>>>
>>> code:
>>> @Validate(field="amount", on="SubmitTransferData", required=true,
>>> minvalue=0,maxlength=15,mask="(^[0-9]+([\\.,][0-9]{1,2})?)")
>>> private int amount;
>>>
>>>
>>> Error Message:
>>> .fffffffff is not a valid Amount
>>> .The value (fffffffff) entered in field Amount must be a valid  
>>> number
>>>
>>> instead of above two message i need to display the following message
>>> .amount entered is invalid.
>>>
>>>
>>> Cheers
>>> ------
>>> Siva kumar
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-display-single-errorMessage-for- 
>>> multiple-validations-tp17797658p17797658.html
>>> Sent from the stripes-users mailing list archive at Nabble.com.
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -----
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://sourceforge.net/services/buy/index.php
>>> _______________________________________________
>>> Stripes-users mailing list
>>> Stripes-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>
>>
>> --------------------------------------------------------------------- 
>> ----
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Stripes-users mailing list
>> Stripes-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/How-to-display- 
> single-errorMessage-for-multiple-validations-tp17797658p17798303.html
> Sent from the stripes-users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------- 
> ---
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to