Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

[S2] Method dependant validation

Andreas Mähler

2008-08-04

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello everyone,

maybe this question has been asked before, but I couldn't find any
postings on the topic:

How can I validate my input in dependency of the action method (without
XML)?

I know that method dependant processing is possible with the
PrepareInterceptor (i.e. prepareDoThis, prepareDoThat methods that are
automatically invoked). I checked the Struts2.1.2 docs[1], but it seems
that the ValidationInterceptor does not offer this feature. I also can't
find a way to make annotation based validation method dependant, which
would also be very useful. (Think of a 'method' parameter that is a
comma-seperated list of methods for which the validation applies -
default is all).

As I thought that this is mainly a WebWork issue, I found this
thread[2]. Someone is saying that it (at least the part with the
source-based validation) is implemented in WebWork2.2, but it seems that
S2 is still using 2.1 - will this change in the near future?

CU
~Andreas


[1] http://struts.apache.org/2.1.2/docs/validation-interceptor.html
[2] http://forums.opensymphony.com/thread.jspa?messageID=28352&#28352


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.