You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Inge Solvoll <in...@gmail.com> on 2006/01/18 16:00:28 UTC

Changing standard validation messages

One very common need for me is to change the messages that the tapestry
validators return on validation errors, to get the messages I want and to
achieve localization.

Is there a way to plug in these message keys globally, say in hivemodule.xml?
Or is the only way to specify which message to use every time I use the
validator in a .page or .jwc file? I hope not, because everything else about
the new validation system is so great and easy to use, without copy/paste of
code and xml between pages.

Thanks

Inge

Re: Changing standard validation messages

Posted by Inge Solvoll <in...@gmail.com>.
Don't know if I've understood this correctly, but the intention for 4.1 is
to add a system that allows me to provide my own properties files for the
standard Tapestry validation messages? And this will happen through a global
configuration point, and not in every .jwc and .page file I write?

Inge

On 1/18/06, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> This is on my list of things that need to happen in 4.1; I've hit the
> same problems others have, when I've tried to define new validators.
>
> On 1/18/06, Ron Piterman <rp...@gmx.net> wrote:
> > I hope this will be fixed in 4.1, but currently, AFAIK, there is only a
> > hack you can use: in your project create a new .properties file with the
> > same name and package as the properties file in the valid package in the
> > tapestry source.
> > Cheers,
> > Ron
> >
> > Inge Solvoll wrote:
> > > One very common need for me is to change the messages that the
> tapestry
> > > validators return on validation errors, to get the messages I want and
> to
> > > achieve localization.
> > >
> > > Is there a way to plug in these message keys globally, say in
> hivemodule.xml?
> > > Or is the only way to specify which message to use every time I use
> the
> > > validator in a .page or .jwc file? I hope not, because everything else
> about
> > > the new validation system is so great and easy to use, without
> copy/paste of
> > > code and xml between pages.
> > >
> > > Thanks
> > >
> > > Inge
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

Re: Changing standard validation messages

Posted by Howard Lewis Ship <hl...@gmail.com>.
This is on my list of things that need to happen in 4.1; I've hit the
same problems others have, when I've tried to define new validators.

On 1/18/06, Ron Piterman <rp...@gmx.net> wrote:
> I hope this will be fixed in 4.1, but currently, AFAIK, there is only a
> hack you can use: in your project create a new .properties file with the
> same name and package as the properties file in the valid package in the
> tapestry source.
> Cheers,
> Ron
>
> Inge Solvoll wrote:
> > One very common need for me is to change the messages that the tapestry
> > validators return on validation errors, to get the messages I want and to
> > achieve localization.
> >
> > Is there a way to plug in these message keys globally, say in hivemodule.xml?
> > Or is the only way to specify which message to use every time I use the
> > validator in a .page or .jwc file? I hope not, because everything else about
> > the new validation system is so great and easy to use, without copy/paste of
> > code and xml between pages.
> >
> > Thanks
> >
> > Inge
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: Changing standard validation messages

Posted by Ron Piterman <rp...@gmx.net>.
also if it is, it doesn't really mutter because it will be ignored...

http://issues.apache.org/jira/browse/TAPESTRY-698

created by : HLS on 10th October,
updated on 12th november,
forgotten on final release feaver

cheers,
Ron



Jesse Kuhnert wrote:
> If it's not in JIRA it will probably never be remembered. (It probably is
> already, but not sure)
> 
> On 1/18/06, Paul Cantrell <ca...@pobox.com> wrote:
> 
>>A warning for those who use this hack: your app will mysteriously
>>break when a future version of Tapestry adds a new validation
>>message, and it isn't in your custom .properties file! I know this
>>from experience.
>>
>>I agree that it would be really nice to have a better way to
>>customize this. With all that hi-tech Hivemind machinery, there must
>>be a good way....
>>
>>Cheers,
>>
>>Paul
>>
>>On Jan 18, 2006, at 9:15 AM, Ron Piterman wrote:
>>
>>
>>>I hope this will be fixed in 4.1, but currently, AFAIK, there is
>>>only a hack you can use: in your project create a new .properties
>>>file with the same name and package as the properties file in the
>>>valid package in the tapestry source.
>>>Cheers,
>>>Ron
>>>
>>>Inge Solvoll wrote:
>>>
>>>>One very common need for me is to change the messages that the
>>>>tapestry
>>>>validators return on validation errors, to get the messages I want
>>>>and to
>>>>achieve localization.
>>>>Is there a way to plug in these message keys globally, say in
>>>>hivemodule.xml?
>>>>Or is the only way to specify which message to use every time I
>>>>use the
>>>>validator in a .page or .jwc file? I hope not, because everything
>>>>else about
>>>>the new validation system is so great and easy to use, without
>>>>copy/paste of
>>>>code and xml between pages.
>>>>Thanks
>>>>Inge
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>>
>>>
>>
>>_________________________________________________________________
>>Piano music podcast: http://inthehands.com
>>Other interesting stuff: http://innig.net
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
> 
> 


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


Re: Changing standard validation messages

Posted by Paul Cantrell <ca...@pobox.com>.
Aha -- it looks like Howard may already have addressed this:

     http://issues.apache.org/jira/browse/TAPESTRY-22

His explanation is a little cryptic to me, but perhaps somebody who  
understands Hivemind better than me can explain....

P

On Jan 18, 2006, at 2:25 PM, Jesse Kuhnert wrote:

> If it's not in JIRA it will probably never be remembered. (It  
> probably is
> already, but not sure)
>
> On 1/18/06, Paul Cantrell <ca...@pobox.com> wrote:
>>
>> A warning for those who use this hack: your app will mysteriously
>> break when a future version of Tapestry adds a new validation
>> message, and it isn't in your custom .properties file! I know this
>> from experience.
>>
>> I agree that it would be really nice to have a better way to
>> customize this. With all that hi-tech Hivemind machinery, there must
>> be a good way....
>>
>> Cheers,
>>
>> Paul
>>
>> On Jan 18, 2006, at 9:15 AM, Ron Piterman wrote:
>>
>>> I hope this will be fixed in 4.1, but currently, AFAIK, there is
>>> only a hack you can use: in your project create a new .properties
>>> file with the same name and package as the properties file in the
>>> valid package in the tapestry source.
>>> Cheers,
>>> Ron
>>>
>>> Inge Solvoll wrote:
>>>> One very common need for me is to change the messages that the
>>>> tapestry
>>>> validators return on validation errors, to get the messages I want
>>>> and to
>>>> achieve localization.
>>>> Is there a way to plug in these message keys globally, say in
>>>> hivemodule.xml?
>>>> Or is the only way to specify which message to use every time I
>>>> use the
>>>> validator in a .page or .jwc file? I hope not, because everything
>>>> else about
>>>> the new validation system is so great and easy to use, without
>>>> copy/paste of
>>>> code and xml between pages.
>>>> Thanks
>>>> Inge
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-user- 
>>> help@jakarta.apache.org
>>>
>>>
>>
>> _________________________________________________________________
>> Piano music podcast: http://inthehands.com
>> Other interesting stuff: http://innig.net
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>>

_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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


Re: Changing standard validation messages

Posted by Jesse Kuhnert <jk...@gmail.com>.
If it's not in JIRA it will probably never be remembered. (It probably is
already, but not sure)

On 1/18/06, Paul Cantrell <ca...@pobox.com> wrote:
>
> A warning for those who use this hack: your app will mysteriously
> break when a future version of Tapestry adds a new validation
> message, and it isn't in your custom .properties file! I know this
> from experience.
>
> I agree that it would be really nice to have a better way to
> customize this. With all that hi-tech Hivemind machinery, there must
> be a good way....
>
> Cheers,
>
> Paul
>
> On Jan 18, 2006, at 9:15 AM, Ron Piterman wrote:
>
> > I hope this will be fixed in 4.1, but currently, AFAIK, there is
> > only a hack you can use: in your project create a new .properties
> > file with the same name and package as the properties file in the
> > valid package in the tapestry source.
> > Cheers,
> > Ron
> >
> > Inge Solvoll wrote:
> >> One very common need for me is to change the messages that the
> >> tapestry
> >> validators return on validation errors, to get the messages I want
> >> and to
> >> achieve localization.
> >> Is there a way to plug in these message keys globally, say in
> >> hivemodule.xml?
> >> Or is the only way to specify which message to use every time I
> >> use the
> >> validator in a .page or .jwc file? I hope not, because everything
> >> else about
> >> the new validation system is so great and easy to use, without
> >> copy/paste of
> >> code and xml between pages.
> >> Thanks
> >> Inge
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
>
> _________________________________________________________________
> Piano music podcast: http://inthehands.com
> Other interesting stuff: http://innig.net
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

Re: Changing standard validation messages

Posted by Paul Cantrell <ca...@pobox.com>.
A warning for those who use this hack: your app will mysteriously  
break when a future version of Tapestry adds a new validation  
message, and it isn't in your custom .properties file! I know this  
from experience.

I agree that it would be really nice to have a better way to  
customize this. With all that hi-tech Hivemind machinery, there must  
be a good way....

Cheers,

Paul

On Jan 18, 2006, at 9:15 AM, Ron Piterman wrote:

> I hope this will be fixed in 4.1, but currently, AFAIK, there is  
> only a hack you can use: in your project create a new .properties  
> file with the same name and package as the properties file in the  
> valid package in the tapestry source.
> Cheers,
> Ron
>
> Inge Solvoll wrote:
>> One very common need for me is to change the messages that the  
>> tapestry
>> validators return on validation errors, to get the messages I want  
>> and to
>> achieve localization.
>> Is there a way to plug in these message keys globally, say in  
>> hivemodule.xml?
>> Or is the only way to specify which message to use every time I  
>> use the
>> validator in a .page or .jwc file? I hope not, because everything  
>> else about
>> the new validation system is so great and easy to use, without  
>> copy/paste of
>> code and xml between pages.
>> Thanks
>> Inge
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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


Re: Changing standard validation messages

Posted by Ron Piterman <rp...@gmx.net>.
I hope this will be fixed in 4.1, but currently, AFAIK, there is only a 
hack you can use: in your project create a new .properties file with the 
same name and package as the properties file in the valid package in the 
tapestry source.
Cheers,
Ron

Inge Solvoll wrote:
> One very common need for me is to change the messages that the tapestry
> validators return on validation errors, to get the messages I want and to
> achieve localization.
> 
> Is there a way to plug in these message keys globally, say in hivemodule.xml?
> Or is the only way to specify which message to use every time I use the
> validator in a .page or .jwc file? I hope not, because everything else about
> the new validation system is so great and easy to use, without copy/paste of
> code and xml between pages.
> 
> Thanks
> 
> Inge
> 


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