You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by JayeshU <ja...@yahoo.com> on 2010/04/09 23:28:32 UTC

Need anchor/link to the fields in Tapestry5 ValidationTracker

I need to provide links to the individual fields in errors at the top.

Tapestry4 had -> IFieldTracking field =
IValidationDelegate.getFieldTracking();

I couldn't find any equivalent in tapestry5.
Tapestry 5 validator returns List<String> getErrors(); But then there is no
way to link these error messages to the actual fields which are in error.

I need to follow company's web standards which mandates to provide <anchor>
links to errornous fields.

Any help is appreciated.
-- 
View this message in context: http://old.nabble.com/Need-anchor-link-to-the-fields-in-Tapestry5-ValidationTracker-tp28197743p28197743.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Need anchor/link to the fields in Tapestry5 ValidationTracker

Posted by Josh Canfield <jo...@gmail.com>.
> I need to provide links to the individual fields in errors at the top.

It seems like a case for ValidationDecorator. You can add the <a
name="fieldid"/> tags for fields with errors. Take a look at the
source for AutofocusValidationDecorator and this old email

http://old.nabble.com/Example-of-overriding-the-default-ValidationDecorator-td26906669s302.html#a26906669


I don't see a way to grab all the Fields in the form, or even just the
fields in error, so you may have to gather that info manually.

Josh

On Fri, Apr 9, 2010 at 2:28 PM, JayeshU <ja...@yahoo.com> wrote:
>
> I need to provide links to the individual fields in errors at the top.
>
> Tapestry4 had -> IFieldTracking field =
> IValidationDelegate.getFieldTracking();
>
> I couldn't find any equivalent in tapestry5.
> Tapestry 5 validator returns List<String> getErrors(); But then there is no
> way to link these error messages to the actual fields which are in error.
>
> I need to follow company's web standards which mandates to provide <anchor>
> links to errornous fields.
>
> Any help is appreciated.
> --
> View this message in context: http://old.nabble.com/Need-anchor-link-to-the-fields-in-Tapestry5-ValidationTracker-tp28197743p28197743.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
--
http://www.bodylabgym.com - a private, by appointment only, one-on-one
health and fitness facility.
--
http://www.ectransition.com - Quality Electronic Cigarettes at a
reasonable price!
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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


Re: Need anchor/link to the fields in Tapestry5 ValidationTracker

Posted by JayeshU <ja...@yahoo.com>.
Thanks Thiago for quick response.

I will add to JIRA.

You mentioned to use ValidationTracker.get(Field) method to match the error.
That's looks like alternative I can use for now. But the followup question
is, how do I get list of *all* the fields in that form, so I can loop
through them ?

Thanks

-- 
View this message in context: http://old.nabble.com/Need-anchor-link-to-the-fields-in-Tapestry5-ValidationTracker-tp28197743p28197899.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Need anchor/link to the fields in Tapestry5 ValidationTracker

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 09 Apr 2010 18:28:32 -0300, JayeshU <ja...@yahoo.com> wrote:

> I couldn't find any equivalent in tapestry5.
> Tapestry 5 validator returns List<String> getErrors(); But then there is  
> no way to link these error messages to the actual fields which are in  
> error.

What about using String getError(Field field) in ValidationTracker? It's  
not elegant, but at least you can try to match fields to their error  
messages.

> I need to follow company's web standards which mandates to provide  
> <anchor> links to errornous fields.

This seems to be a nice feature to be added to Tapestry itself. Please  
file a JIRA about it.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.
http://www.arsmachina.com.br

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