how to avoid form's validation if the user choose cancel?

2008-01-02 Thread xianwinwin
I have a login form. it has 3 buttons: 1. login 2. register 3. cancel when the user clicks the login - the application validates that the user input data on the 'username' and 'password' fields. Question: how can I avoid this validation if the user clicks either 'register' or 'cancel' thanks

Re: how to avoid form's validation if the user choose cancel?

2008-01-02 Thread Alberto A. Flores
one way I did that was by using the "non-validating" method point to a method (in the Action class) to have the following annotation @SkipValidation Then in the struts tag, you force the button to use such method (method attribute in tag). Good luck! xianwinwin wrote: I have a login form.

RE: how to avoid form's validation if the user choose cancel?

2008-01-02 Thread Martin Gainty
the easiest way is to configure login/(cancel)logout/register to separate actionsA complete example is located at http://struts.apache.org/2.x/docs/simplelogin-with-session.html ThanksMartin__Disclaimer and confidentiality noteEverything in this e-mail

Re: how to avoid form's validation if the user choose cancel?

2008-01-03 Thread xianwinwin
YES! exactly what I needed. thanks!!! Alberto A. Flores wrote: > > one way I did that was by using the "non-validating" method point to a > method (in the Action class) to have the following annotation > > @SkipValidation > > Then in the struts tag, you force the button to use such method

Re: how to avoid form's validation if the user choose cancel?

2008-02-24 Thread Juanjo Cuadrado
And in the version 1.x? 2008/1/3, xianwinwin <[EMAIL PROTECTED]>: > > > YES! exactly what I needed. thanks!!! > > > > > > Alberto A. Flores wrote: > > > > one way I did that was by using the "non-validating" method point to a > > method (in the Action class) to have the following annotation > > >