You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Penyihir Kecil <pe...@gmail.com> on 2007/12/08 17:57:13 UTC

T5: how to override default msg error

i have a textfield that must be int value (based on my entity bean type).
tapestry does the validate automatically and give the message :
- The input value 'abc' is not parseable as an integer value.

how can i overwrite the default error message ?

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


Re: T5: how to override default msg error

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Not if you want to override the *default* error messages.

If you just want to override the error messages in a given component, 
then put a entry in your component's .properties file with the key 
fieldid-validatoin-message, that is, username-maxlength-message etc.

I don't know if this works for translator messages too, though.

-Filip

Penyihir Kecil skrev:
> it works....
> thnx Filip...
> but is there any way to do it more simple.... ^_^ (just curious)
> 
> On Dec 9, 2007 1:21 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:
> 
>> Create a package named org.apache.tapestry.internal and put a
>> ValidationMessages.properties file there. If you're using Maven you'll
>> have to put this in src/main/resources/org/apache/tapestry/internal.
>>
>> If you want to override the error banner while you're at it, create a
>> package name org.apache.tapestry.corelib.components and put a
>> Errors.properties file in there. Again, in
>> src/main/resources/org/apache/tapestry/corelib/components if you're
>> using Maven.
>>
>> You can find the default versions of these files at the same locations
>> in the Tapestry 5 source.
>>
>> Hope this helps.
>>
>> -Filip
>>
>> Penyihir Kecil skrev:
>>> i have a textfield that must be int value (based on my entity bean
>> type).
>>> tapestry does the validate automatically and give the message :
>>> - The input value 'abc' is not parseable as an integer value.
>>>
>>> how can i overwrite the default error message ?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 

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


Re: T5: how to override default msg error

Posted by Penyihir Kecil <pe...@gmail.com>.
it works....
thnx Filip...
but is there any way to do it more simple.... ^_^ (just curious)

On Dec 9, 2007 1:21 AM, Filip S. Adamsen <fs...@fsadev.com> wrote:

> Create a package named org.apache.tapestry.internal and put a
> ValidationMessages.properties file there. If you're using Maven you'll
> have to put this in src/main/resources/org/apache/tapestry/internal.
>
> If you want to override the error banner while you're at it, create a
> package name org.apache.tapestry.corelib.components and put a
> Errors.properties file in there. Again, in
> src/main/resources/org/apache/tapestry/corelib/components if you're
> using Maven.
>
> You can find the default versions of these files at the same locations
> in the Tapestry 5 source.
>
> Hope this helps.
>
> -Filip
>
> Penyihir Kecil skrev:
> > i have a textfield that must be int value (based on my entity bean
> type).
> > tapestry does the validate automatically and give the message :
> > - The input value 'abc' is not parseable as an integer value.
> >
> > how can i overwrite the default error message ?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: T5: how to override default msg error

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Create a package named org.apache.tapestry.internal and put a 
ValidationMessages.properties file there. If you're using Maven you'll 
have to put this in src/main/resources/org/apache/tapestry/internal.

If you want to override the error banner while you're at it, create a 
package name org.apache.tapestry.corelib.components and put a 
Errors.properties file in there. Again, in 
src/main/resources/org/apache/tapestry/corelib/components if you're 
using Maven.

You can find the default versions of these files at the same locations 
in the Tapestry 5 source.

Hope this helps.

-Filip

Penyihir Kecil skrev:
> i have a textfield that must be int value (based on my entity bean type).
> tapestry does the validate automatically and give the message :
> - The input value 'abc' is not parseable as an integer value.
> 
> how can i overwrite the default error message ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

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