On 28.06.2012 09:21, Pham Hoang Tien wrote: > Hi every one, > > I am a new tapestry, I am learning at chapter 6 "User Input Validation". And > I meet an issue that it can not display errors message when I use <t:errors > />(I used tapesty-core-5.1.0.5 of tapestry version). Following is my > template page: > > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> > <head> > <title>Celebrity Collector</title> > </head> > <body> > > Celebrity Collector > > <p>Log in here:</p> > <t:form t:id="loginForm"> > *<t:errors />* > <table> > <tr> > <td> > <t:label t:for="userName">Label > for the first text box</t:label>: > </td> > <td> > <input type="text" > t:id="userName" t:type="TextField" > t:value="userName" t:validate="required" /> > </td> > </tr> > <tr> > <td> > <t:label t:for="password">The > second label</t:label>: > </td> > <td> > <input type="text" > t:id="password" t:type="PasswordField" > t:value="password" t:validate="required" /> > </td> > </tr> > <tr> > <td colspan="2" align="center"> > <input type="submit" value="Log > In" /> > </td> > </tr> > </table> > </t:form> > <p> # Or register </p> > </body> > </html> > > It only show tooltip for UserName and password textfields with the message > is "You must provide a value for [UserName/Passwor]" when click "Log In" > button, but it can not display Errors message "You must correct the > following errors before you may continue" as the book showing. > Please help to understand. Thanks every one. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Do-not-display-errors-message-tp5714134.html > Sent from the Tapestry - Dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
First, wrong list. [email protected] is where you'd want to ask those kind of questions. It covers Tapestry usage questions. This one here is for Tapestry development topics. Second, Nabble has that nice button called "subscribe" when a subscriptions is needed. Use it. It saves us time that we can than spend to answer your questions. Third, <t:errors /> displays server-side validation errors. Since client-side validation prevents you from submitting the form in the first place, no server side validation occurs and no errors are being displayed by the <t:errors /> component. Try disabling javascript in your browser and you will see that it works. Also see [1]. Uli [1] http://tapestry.apache.org/forms-and-validation.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
