Ozu, nut sure to be able to help you more.
I know how to call an action in Ajax, now it seems you want to
reproduce Struts2 validation process using Ajax and this requires more
analysis.
What you can do at least is do the validation in you main action
method. And even better, I think you could even specify the name of
the method to call in your action.
Another option is to create 2 actiosns in your configuration file
calling the same java action, one for the real action, and the other
for the validation.

Cimballi


On Fri, Apr 30, 2010 at 3:34 PM, Ozu Natsu <ozu.na...@gmail.com> wrote:
> Closer, still not working... I had 2 problems (I think).
> #(this).serialize() was not serializing the form data.  I put my form
> name in for the selector and now the form data is being passed to the
> get. I think the other problem is that the action method doesn't match
> my validator name.  My validator is set up as
> Action-update-validation.xml.  So I added method ="update" to the
> struts action definition. Now it appears to be trying to peform the
> update instead of just performing the validation.
>
> What exactly should be the chain of events happening here?  Shouldn't
> it be something like the get invokes the validate() method, which
> returns json data to the javascript callback where my alert is at?  I
> would have suspected my callback method data to be populated with the
> validation results.

-- 
Cimballi
JAVA J2EE Freelance
http://cimballi.elance.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to