2011/11/28 Josep García <jgar...@isigma.es>: > I have tried this option, not without a few workarounds: I had to add a > param to struts.xml so validation files are loaded during runtime: > <constant name="struts.configuration.xml.reload" value="true"/>
Hmmm.... that's bad, each time the configs will be reload from the disk and performance of the application will decrease :/ > I have arrived to a leve in which I can call, from my Action: > > validatorManager.validate(this, "my-validation"); > > and this tries to validate the form against a MyAction-my-validation.xml > file with the validation rules. > So far, so good. > However, my form post the user input as form parameters of the type: > "dom.myparam1", "dom.myparam2", etc. > Within the validation process, the validator calls OgnlContext.get(Object > key) to retrieve the value to validate agains a validation rule, but fails > to retrieve it. > While debugging, I can see the params are there in a map entry: Key: > "com.opensymphony.xwork2.ActionContext.parameters", and in value: all my > form params. > buut it fails to get the value. > > Any possible workaround for this? Can I make OgnlContext look into the > ActionContext.parameters map? Or should I add programatically my dynamic > fields to the Ognl Context? Is that possible? How? OGNL should search through out the stack, maybe try to put those parameters on top ? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org