Yeah that's mostly how it's done. But - you may want to think about handling this differently if you have the opportunity. At least from a ui perspective - I've not been particularly fond of web forms that display all my errors at the top or bottom in a list that I then need to re lookup for each field I'm trying to correct. (maybe some contextual display of errors next to the relevant section of a form - ie a fieldset - that still lists things but at least has them listed on a per section basis)
just random thoughts... On 8/3/07, Adam Bennett <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm trying to wrap my head around Tapestry. I'll be ordering some books > shortly but in the meantime: What is the simplest way (in 4.1) to show > a list of form validation errors. Here is the essence of my page: > > <html jwcid="@Shell" title="Home"> > <body jwcid="@Body"> > > <!-- I want to show the errors here --> > > <form jwcid="[EMAIL PROTECTED]" success="listener:doSubmit"> > <label jwcid="@FieldLabel" field="component:user"/> > > <input jwcid="[EMAIL PROTECTED]" displayName="Email" > value="ognl:login.user" > validators="validators:required,email[Invalid email > address]"/> > > <label jwcid="@FieldLabel" field="component:password"/> > <input jwcid="[EMAIL PROTECTED]" displayName="Password" > value="ognl:login.pwd" validators="validators:required"/> > > <input type="submit" value="Log in"/> > </form> > </body> > </html> > > It doesn't seem like a task that should require any custom java code in > my page class. From what I can guess It will probably involve something > like this: > > <ul> > <span jwcid="@For" > source="ognl:components.myForm.delegate.fieldTracking" > value="currentFieldTracking"> > <li> > <span jwcid="@Delegator" > delegate="currentFieldTracking.errorRenderer"/> > </li> > </span> > </ul> > > Yet the above doesn't work. > > Thanks for your patience. > - Adam (a former (hopefully) Struts developer) > > > > Videx Inc. 1105 N. E. Circle Blvd. Corvallis OR 97330 (541) 758-0521 > CONFIDENTIAL COMMUNICATION: The email message and any attachments are > intended only for the addressee. They may be privileged, confidential, and > protected from disclosure. If you are not the intended recipient, any > dissemination, distribution, or copying is expressly prohibited. If you > received this email message in error, please notify the sender immediately by > replying to this e-mail message or by telephone > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]