Richard Sayre wrote:
The validate method comes from com.opensymphony.xwork2.Validateable
and is implemented by com.opensymphony.xwork2.ActionSupport.

The API description from each is :
void validate()    Performs validation.
void validate()   A default implementation that validates nothing.
Subclasses should override this method to provide validations.

I was wondering if this works with Struts 2?  I can't find anything
outside of XML and Annotated validation when I search.

The validation page on the S2 wiki states:

"Usefull Information: More complicated validation should probably be done in the validate() method on the action itself (assuming the action implements Validatable interface which ActionSupport already does)."

Will it work with built in Ajax validation?

I have run out of ways to tell you I don't know, but again, it'd take a minute or two to find out.

If yes, do I implement the validate method using the ValidationAware API?

Using the ValidationAware methods is the canonical way to add errors.

A link provided on the validation page discusses manual validation:

http://today.java.net/pub/a/today/2006/01/19/webwork-validation.html

Note also that calling super.validate() will run XML/annotation-based validation from within the validate() method.

Dave


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

Reply via email to