I've noticed that when using field validation on a ModelDriven action, the interceptor tries to validate the action fields instead of model fields.
I've tracked down the problem to ValidationInterceptor:


// populate model bean's fields if action is ModelDriven, otherwise populate action's fields
ActionValidatorManager.validate(action, context);


I think it should be:

// populate model bean's fields if action is ModelDriven, otherwise populate action's fields
if (action instanceof ModelDriven) {
ActionValidatorManager.validate(((ModelDriven) action).getModel(), context);
} else {
ActionValidatorManager.validate(action, context);
}


or, perhaps, it should lookup the object directly in the ValueStack (the ModelDrivenInterceptor push the model *before* the action).

Any thoughts ?

--
Marco Papini




------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to