[S2]ActionSupport set parameters question.

2007-10-22 Thread Eugen Stoianovici
I'm having trouble understanding how ActionSupport works. I've extended ActionSupport to handle a form page. If the from contains errors (ie: i have an amount field mapped like s:text name=invoice.amount/ and the user types in asdf) the action mapped to result type execute is never called and,

Re: [S2]ActionSupport set parameters question.

2007-10-22 Thread David Harland
Add something like this to your action public void validate() { User user = getUser(); if (StringUtils.isBlank(user.getName())) { addActionError(getText(user.name.empty)); } if (StringUtils.isBlank(user.getAddress())) { addActionError(getText(user.address.empty)); } } Have a

Re: [S2]ActionSupport set parameters question.

2007-10-22 Thread Eugen Stoianovici
Thank you, it's just what i needed David Harland wrote: Add something like this to your action public void validate() { User user = getUser(); if (StringUtils.isBlank(user.getName())) { addActionError(getText(user.name.empty)); } if (StringUtils.isBlank(user.getAddress())) {