-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rahul,
On 4/27/2010 1:09 AM, Rahul Mohan wrote:
> I think the fundamental mechanism of S2 is the configurable interceptor
> stack where each interceptor applies itself to the current action based on
> the interfaces the action implements. You can still reuse this mechanism
> by defining your own interceptor stack with your own interfaces. Lets S2 (
> or rather xwork ) take care of the wiring. Essentially, building your
> framework using the underlying configurable interceptor stack mechanism.
> Does that answer your question?
Not really.... what I'm trying to do is build an action that does not
depend upon the S2/xwork APIs, but can still work with them.
Specifically, I'd rather have:
public class MyAction
extends (nothing)
implements (Nothing)
{
public void addFieldError(String field, String message) { ... };
}
rather than this:
public class MyAction
extends ActionSupport
and/or
implements ValidationAware
{
// addError declared in ValidationAware
public void addFieldError(String field, String message) { ... };
}
I believe the ValidationInterceptor has code that looks something like this:
if(action instanceof ValidationAware)
{
foreach field {
validate field
if(error)
action.addFieldError(fieldName, errorMessage);
}
}
I was wondering if there was any interest in an alternative
implementation that did something more like this:
if(declaresValidationMethods(action.getClass())
{
foreach field {
validate field
if(error)
action.addFieldError(fieldName, errorMessage);
}
}
I could certainly implement this myself, but I'm wondering if there is
wider interest in such an interceptor.
Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvYVScACgkQ9CaO5/Lv0PBmaQCfRGHa7iD3rOUkukq9mRbiNW/F
d7MAmwfYI3P0iUhD3lnZs0U7jv+qHj5h
=Y6iv
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]