@Component(id="email", type="TextField",
bindings={"validators=beans.emailValidator"})Try validators instead of validator. TextField is the replacement for ValidField in Tap4. On 8/2/05, Lance Arlaus <[EMAIL PROTECTED]> wrote: > I finally got a version running using a form field of type ValidField, but I > get a message that it's been deprecated. Anybody know the replacement in > Tap4? > > > -----Original Message----- > From: Lance Arlaus [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 02, 2005 12:46 PM > To: Tapestry Users Mailing List > Subject: Tap4 Basic Form Validation without Page Specification > > I'm trying to get basic form validation up and running without a page > specification, if possible, but I can't seem to get it to work. > > Form comes up fine, but validation's a no-go :( > > Here's what I've got: > > > > Page: > > <form jwcid='[EMAIL PROTECTED]' listener="listener:formSubmit" > delegate="beans.validationDelegate" method="get"> > > . > > <td><input jwcid='email' value='email' length='30'></input></td> > > . > > > > Page Class: > > > > public abstract class Home extends BasePage { > > > > @Bean > > public abstract ValidationDelegate getValidationDelegate(); > > @Bean(lifecycle=Lifecycle.PAGE, > initializer="required,clientScriptingEnabled") > > public abstract EmailValidator getEmailValidator(); > > > > @Component(id="email", type="TextField", > bindings={"validator=beans.emailValidator"}) > > public abstract TextField getEmailField(); > > > > public abstract String getEmail(); > > public abstract void setEmail(String email); > > . > > } > > > > Generated HTML: > > . > > <td><input type="text" name="email" value="" id="email" > validator="[EMAIL PROTECTED]" > length="30"/></td> > > . > > > > Looks like Tap is just doing a toString() and considering validator an > informal parameter. > > Suggestions, anyone? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
