Re: ValidatorForm exception handling

2004-05-12 Thread kimbuba
> Now as you say, the validate method of the ActionForm doesn't handle > exceptions. So my suggestion was to move your validation out of the > ActionForm's validate method and into the Action's execute method. That way > if your DAO throws an exception, you could handle it using the struts > except

Re: ValidatorForm exception handling

2004-05-11 Thread Niall Pemberton
Message - From: "kimbuba" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 12, 2004 12:26 AM Subject: Re: ValidatorForm exception handling > Thnx Niall but i don't understand how to set up that. > > Here's my situation > i got

Re: ValidatorForm exception handling

2004-05-11 Thread kimbuba
I see what you think: 1) do common validation stuff (required..) 2) if it pass go to action execute 3) do others validation with BusinessDelegate 4) -> success OR go back with errors: return mapping.getInputForward(); the problem is different. If validator finds some errors it will go back to inpu

Re: ValidatorForm exception handling

2004-05-11 Thread kimbuba
Thnx Niall but i don't understand how to set up that. Here's my situation i got one action MyAction. and MyForm. i have a very basic validation MyAction if has parameter="Submit" it will do prevalidation stuff like loading beans to populate fileds otherwise it will let ActionForm validate and exe

Re: ValidatorForm exception handling

2004-05-11 Thread Niall Pemberton
Do that kind of validation in your Action rather than ActionForm, that way you can use the struts exception handling. In the Action's execute method if (errors from Business Delegate) { ActionErrors errors = new ActionErrors(); errors.Add(); saveErrors(request, errors); return map