Re: Please help! Validation Errors

2008-12-15 Thread Faraz Ali
08 09:47:33 +0800 > > From: farazali.fa...@gmail.com > > To: user@struts.apache.org > > Subject: Re: Please help! Validation Errors > > > > Any idea? > > > > On Fri, Dec 12, 2008 at 6:04 PM, Faraz Ali > wrote: > > > > > Hi Andy

RE: Please help! Validation Errors

2008-12-14 Thread Martin Gainty
08 09:47:33 +0800 > From: farazali.fa...@gmail.com > To: user@struts.apache.org > Subject: Re: Please help! Validation Errors > > Any idea? > > On Fri, Dec 12, 2008 at 6:04 PM, Faraz Ali wrote: > > > Hi Andy, > > > > Please take a look at the code snipp

Re: Please help! Validation Errors

2008-12-14 Thread Faraz Ali
Any idea? On Fri, Dec 12, 2008 at 6:04 PM, Faraz Ali wrote: > Hi Andy, > > Please take a look at the code snippet and suggest. > > *MyAction.java* > public class MyAction extends ActionSupport { > //getAction > //setAction > public String execute() throws Exception { > if(action==1) { >

Re: Please help! Validation Errors

2008-12-12 Thread Faraz Ali
Hi Andy, Please take a look at the code snippet and suggest. *MyAction.java* public class MyAction extends ActionSupport { //getAction //setAction public String execute() throws Exception { if(action==1) { return "input"; } elseif(action==2) { return "showResult"; } else { retur

Re: Please help! Validation Errors

2008-12-10 Thread Andy Sykes
Faraz, I think at this point some code would help. Could you post your struts.xml, and the action? Andy. On 10 Dec 2008, at 17:16, Faraz Ali wrote: Yes Andy, you are right. I added the , but why it is executing automatically. It is executed automatically when i start my application. On

Re: Please help! Validation Errors

2008-12-10 Thread Dave Newton
--- On Wed, 12/10/08, Faraz Ali wrote: > i mean when i access my application's main page. when i > hit http://localhost:8080/mywebapp. If you hit an action that has validations then this is correct behavior. There are a few ways to handle this, including defining an action that runs the action's

Re: Please help! Validation Errors

2008-12-10 Thread Faraz Ali
i mean when i access my application's main page. when i hit http://localhost:8080/mywebapp. On Thu, Dec 11, 2008 at 1:20 AM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Wed, 12/10/08, Faraz Ali wrote: > > Yes Andy, you are right. I added the , but why it > > is executing automatically. It i

Re: Please help! Validation Errors

2008-12-10 Thread Dave Newton
--- On Wed, 12/10/08, Faraz Ali wrote: > Yes Andy, you are right. I added the , but why it > is executing automatically. It is executed automatically when i start > my application. What do you mean by "when i start my application"? Are you visiting a URL? Dave

Re: Please help! Validation Errors

2008-12-10 Thread Faraz Ali
Yes Andy, you are right. I added the , but why it is executing automatically. It is executed automatically when i start my application. On Wed, Dec 10, 2008 at 6:19 PM, Andy Sykes <[EMAIL PROTECTED]> wrote: > Faraz, > > When using validation, the input result tells Struts where to > dispatch/redi

Re: Please help! Validation Errors

2008-12-10 Thread Andy Sykes
Faraz, When using validation, the input result tells Struts where to dispatch/ redirect to if there's a validation error. When you submit the form, Struts checks the fields against the validation XML - if there's an error, it adds FieldError objects to the FieldErrors object on the value s