tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lance Arlaus" <lance.arl...@codeberet.com>
Subject Tap4 Basic Form Validation without Page Specification
Date Tue, 02 Aug 2005 16:45:59 GMT
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='form@Form' 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="org.apache.tapestry.valid.EmailValidator@eb40fe"
length="30"/></td>

.

 

Looks like Tap is just doing a toString() and considering validator an
informal parameter.

Suggestions, anyone?


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message