Greetings all,

I have the following:

  @Validate(on = {"register"}, required = true, converter =
  EmailTypeConverter.class)
  public final String getEmail() {
    return email;
  }

And we have a single JSP that uses DHTML to show/hide various portions
of the input form.  If they're in "Register" mode, then the email
address field is shown, but if they're in "Login" mode, then it isn't. 
In every other field, the 'on = {"register"}' thing works, but in this
one it doesn't, especially if they type in an invalid email address but
then decide they don't want to register any more.  We still get 'The
value "abc" is not a valid email address' even though the email address
field is no longer displayed.

What would it take to get the type converters to fire only on validation
(especially since we're only using them for validation), and not on
binding?

I'd rather not clear out those fields when the user is switching back
and forth, but I guess I can hack it to conditionally clear them on post
if they push one button or another -- 

$('#loginButton').submit(function() {$('#emailAddress').clear();}); //
or something

However, if I could get the framework to behave as I expect, I would be
happier.  ;-)

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to