sorry that this post is somewhat of a duplicate, but i feel like what i am doing is fairly simple, but it's turning into a battle for me. anyway, here's a fairly detailed description of what i'm trying to do.

in my header, there is a login link. when a user clicks the login link, i cover the entire app with a mostly transparent div and fade in a login form. it looks just like the example login on the prototype window login page: http://prototype-window.xilinus.com/samples.html.
It's example 7. I'm not using prototype-window though. Just scriptaculous and css.

If you check out this example, I want to do exactly what it does, but add in the ajax call to the server for the login. If it passes, then the entire app should forward to a new url. If it fails, I should get an error message and stay on the same page, just like in this example.

So far, this is what I'm doing to implement this. The login link kicks off an ajax call that populates a div with my login form. I do this so that I can use spring binding and my back end validation logic with a SimpleFormController. Works like a charm. This is where things start to get fuzzy.

I'm using an ajax interceptor that runs after my LoginController (on submit). Here are my 2 big problems:

1) Why does my validation not work? I get validation errors even when I submit valid data.
2) Is it possible to use my spring binding for validation, and refresh the div with the controller's results when validation fails? That way I don't have to mess with populating a div with error messages and all that.

Maybe I don't have my head completely wrapped around Handlers (specifically org.springmodules.xt.ajax.validation.DefaultValida tionHandler), but it just seems really bad to write out html code on the back end. I'm seeing that in a lot of the ajax code. If nothing else I could create my objects to hold error messages, put them in session, then use dwr javascripts to get those objects out of session and display them however I want.

Sorry for the uber long post, but this is killing me.

Thanks for any and all help!!!