You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Katarzyna Marszalek <k....@digitalone.pl> on 2007/06/01 12:02:38 UTC

T5: Displaying field error message at specific point in the template - possible?

 From looking at the component reference for Tapestry 5, I'm a bit 
puzzled by the presence on the Errors component (which displays all 
errors in a form as a list - rather exotic case, if you ask me,) but no 
means of fine-controlling where the error message for a particular field 
should be displayed. Is it just not implemented yet, or am I missing 
some other mechanism?

In Tapestry 4 the messages were displayed immediately after fields, 
which was not perfect (if a design required some additional markup 
between field and the error {example: form in a table, errors in the 
right column}, this created a nasty problem,) and I was hoping for some 
more flexible mechanism for placing errors in Tapestry 5.

If it's not implemented yet, I would propose extending the Errors 
component, so that it can take a list of components to display errors 
for (in a special case, only one could be provided, and then the 
component would not display a list, but just a message {maybe within a 
SPAN element with an error class}) - do other users think this would be 
useful?

Regards,
Katarzyna Marszałek


--------

Digital One Sp. z o.o., ul. Dowborczykow 25, 90-019 Lodz, Poland, tel. +48 42 677 14 77, fax +48 42 677 14 78, http://www.digitalone.pl/ wpisana do rejestru przedsiebiorcow Krajowego Rejestru Sadowego w Sadzie Rejonowym w Lodzi Wydzial XX Gospodarczy Krajowego Rejestru Sadowego pod numerem KRS 0000088640, o kapitale zakladowym 210.000,00 zl i kapitale wplaconym 210.000,00 zl. NIP 725-17-56-437, REGON 472265419 

Ta wiadomosc zawiera poufne informacje przeznaczone tylko dla adresata. Jezeli nie jestescie Panstwo jej adresatem, badz otrzymaliscie ja przez pomylke, prosimy o powiadomienie o tym nadawcy oraz trwale jej usuniecie. Odmienne zachowanie jest niezgodne z interesem Digital One Sp. z o.o. i moze naruszac prawo.

This message contains confidential information intended solely for the addressee. If you are not the addressee or if you have received the message in error, please contact the sender and delete it permanently. Failing to comply is contrary to Digital One Sp. z o.o. interest and may be unlawful.

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


Re: T5: Displaying field error message at specific point in the template - possible?

Posted by Martin Reurings <ma...@windgazer.nl>.
Sorry to visit back on this subject. I've been digging through the
source-code and javadocs to get my head around the way validation is handled
and I was left wondering over one final aspect of the whole set.

Where do I tell Tapestry / a form / a form-element to use my custom
implementation of ValidationDecorator. As in, I want the
DefaultValidationDecorator to be ignored and instead use my own.

Regards,

 Martin

On 6/2/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> Ultimately, the control over exception reporting is in the hands of the
> ValidationDecorator.  It is responsible for decorating Label components
> and
> the form control element components, so it can choose do whatever you
> want.
>
> There's a lot of nice built in support, that coordinates the
> ValidationDecorator with the built-in CSS and JavaScript libraries, but
> you
> can absolutely go your own path on this.
>
> On 6/1/07, Martin Grotzke <ma...@javakaffee.de> wrote:
> >
> > On Fri, 2007-06-01 at 12:02 +0200, Katarzyna Marszalek wrote:
> > >  From looking at the component reference for Tapestry 5, I'm a bit
> > > puzzled by the presence on the Errors component (which displays all
> > > errors in a form as a list - rather exotic case, if you ask me,) but
> no
> > > means of fine-controlling where the error message for a particular
> field
> > > should be displayed. Is it just not implemented yet, or am I missing
> > > some other mechanism?
> > >
> > > In Tapestry 4 the messages were displayed immediately after fields,
> > > which was not perfect (if a design required some additional markup
> > > between field and the error {example: form in a table, errors in the
> > > right column}, this created a nasty problem,) and I was hoping for
> some
> > > more flexible mechanism for placing errors in Tapestry 5.
> > >
> > > If it's not implemented yet, I would propose extending the Errors
> > > component, so that it can take a list of components to display errors
> > > for (in a special case, only one could be provided, and then the
> > > component would not display a list, but just a message {maybe within a
> > > SPAN element with an error class}) - do other users think this would
> be
> > > useful?
> > Yes, we also would like to have such a solution!
> >
> > Cheers,
> > Martin
> >
> >
> > >
> > > Regards,
> > > Katarzyna Marszałek
> > >
> > >
> > > --------
> > >
> > > Digital One Sp. z o.o., ul. Dowborczykow 25, 90-019 Lodz, Poland, tel.
> > +48 42 677 14 77, fax +48 42 677 14 78, http://www.digitalone.pl/wpisana
> > do rejestru przedsiebiorcow Krajowego Rejestru Sadowego w Sadzie
> Rejonowym w
> > Lodzi Wydzial XX Gospodarczy Krajowego Rejestru Sadowego pod numerem KRS
> > 0000088640, o kapitale zakladowym 210.000,00 zl i kapitale wplaconym
> > 210.000,00 zl. NIP 725-17-56-437, REGON 472265419
> > >
> > > Ta wiadomosc zawiera poufne informacje przeznaczone tylko dla
> adresata.
> > Jezeli nie jestescie Panstwo jej adresatem, badz otrzymaliscie ja przez
> > pomylke, prosimy o powiadomienie o tym nadawcy oraz trwale jej
> usuniecie.
> > Odmienne zachowanie jest niezgodne z interesem Digital One Sp. z o.o. i
> > moze naruszac prawo.
> > >
> > > This message contains confidential information intended solely for the
> > addressee. If you are not the addressee or if you have received the
> message
> > in error, please contact the sender and delete it permanently. Failing
> to
> > comply is contrary to Digital One Sp. z o.o. interest and may be
> unlawful.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > --
> > Martin Grotzke
> > http://www.javakaffee.de/blog/
> >
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>

Re: T5: Displaying field error message at specific point in the template - possible?

Posted by Howard Lewis Ship <hl...@gmail.com>.
Ultimately, the control over exception reporting is in the hands of the
ValidationDecorator.  It is responsible for decorating Label components and
the form control element components, so it can choose do whatever you want.

There's a lot of nice built in support, that coordinates the
ValidationDecorator with the built-in CSS and JavaScript libraries, but you
can absolutely go your own path on this.

On 6/1/07, Martin Grotzke <ma...@javakaffee.de> wrote:
>
> On Fri, 2007-06-01 at 12:02 +0200, Katarzyna Marszalek wrote:
> >  From looking at the component reference for Tapestry 5, I'm a bit
> > puzzled by the presence on the Errors component (which displays all
> > errors in a form as a list - rather exotic case, if you ask me,) but no
> > means of fine-controlling where the error message for a particular field
> > should be displayed. Is it just not implemented yet, or am I missing
> > some other mechanism?
> >
> > In Tapestry 4 the messages were displayed immediately after fields,
> > which was not perfect (if a design required some additional markup
> > between field and the error {example: form in a table, errors in the
> > right column}, this created a nasty problem,) and I was hoping for some
> > more flexible mechanism for placing errors in Tapestry 5.
> >
> > If it's not implemented yet, I would propose extending the Errors
> > component, so that it can take a list of components to display errors
> > for (in a special case, only one could be provided, and then the
> > component would not display a list, but just a message {maybe within a
> > SPAN element with an error class}) - do other users think this would be
> > useful?
> Yes, we also would like to have such a solution!
>
> Cheers,
> Martin
>
>
> >
> > Regards,
> > Katarzyna Marszałek
> >
> >
> > --------
> >
> > Digital One Sp. z o.o., ul. Dowborczykow 25, 90-019 Lodz, Poland, tel.
> +48 42 677 14 77, fax +48 42 677 14 78, http://www.digitalone.pl/ wpisana
> do rejestru przedsiebiorcow Krajowego Rejestru Sadowego w Sadzie Rejonowym w
> Lodzi Wydzial XX Gospodarczy Krajowego Rejestru Sadowego pod numerem KRS
> 0000088640, o kapitale zakladowym 210.000,00 zl i kapitale wplaconym
> 210.000,00 zl. NIP 725-17-56-437, REGON 472265419
> >
> > Ta wiadomosc zawiera poufne informacje przeznaczone tylko dla adresata.
> Jezeli nie jestescie Panstwo jej adresatem, badz otrzymaliscie ja przez
> pomylke, prosimy o powiadomienie o tym nadawcy oraz trwale jej usuniecie.
> Odmienne zachowanie jest niezgodne z interesem Digital One Sp. z o.o. i
> moze naruszac prawo.
> >
> > This message contains confidential information intended solely for the
> addressee. If you are not the addressee or if you have received the message
> in error, please contact the sender and delete it permanently. Failing to
> comply is contrary to Digital One Sp. z o.o. interest and may be unlawful.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> --
> Martin Grotzke
> http://www.javakaffee.de/blog/
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

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

Re: T5: Displaying field error message at specific point in the template - possible?

Posted by Martin Grotzke <ma...@javakaffee.de>.
On Fri, 2007-06-01 at 12:02 +0200, Katarzyna Marszalek wrote:
>  From looking at the component reference for Tapestry 5, I'm a bit 
> puzzled by the presence on the Errors component (which displays all 
> errors in a form as a list - rather exotic case, if you ask me,) but no 
> means of fine-controlling where the error message for a particular field 
> should be displayed. Is it just not implemented yet, or am I missing 
> some other mechanism?
> 
> In Tapestry 4 the messages were displayed immediately after fields, 
> which was not perfect (if a design required some additional markup 
> between field and the error {example: form in a table, errors in the 
> right column}, this created a nasty problem,) and I was hoping for some 
> more flexible mechanism for placing errors in Tapestry 5.
> 
> If it's not implemented yet, I would propose extending the Errors 
> component, so that it can take a list of components to display errors 
> for (in a special case, only one could be provided, and then the 
> component would not display a list, but just a message {maybe within a 
> SPAN element with an error class}) - do other users think this would be 
> useful?
Yes, we also would like to have such a solution!

Cheers,
Martin


> 
> Regards,
> Katarzyna Marszałek
> 
> 
> --------
> 
> Digital One Sp. z o.o., ul. Dowborczykow 25, 90-019 Lodz, Poland, tel. +48 42 677 14 77, fax +48 42 677 14 78, http://www.digitalone.pl/ wpisana do rejestru przedsiebiorcow Krajowego Rejestru Sadowego w Sadzie Rejonowym w Lodzi Wydzial XX Gospodarczy Krajowego Rejestru Sadowego pod numerem KRS 0000088640, o kapitale zakladowym 210.000,00 zl i kapitale wplaconym 210.000,00 zl. NIP 725-17-56-437, REGON 472265419 
> 
> Ta wiadomosc zawiera poufne informacje przeznaczone tylko dla adresata. Jezeli nie jestescie Panstwo jej adresatem, badz otrzymaliscie ja przez pomylke, prosimy o powiadomienie o tym nadawcy oraz trwale jej usuniecie. Odmienne zachowanie jest niezgodne z interesem Digital One Sp. z o.o. i moze naruszac prawo.
> 
> This message contains confidential information intended solely for the addressee. If you are not the addressee or if you have received the message in error, please contact the sender and delete it permanently. Failing to comply is contrary to Digital One Sp. z o.o. interest and may be unlawful.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
-- 
Martin Grotzke
http://www.javakaffee.de/blog/