When you say it works then you should say how you did that.
Because others may be looking for the solution for your problem.

On Wed, Oct 29, 2008 at 9:39 PM, Juanjo Cuadrado <[EMAIL PROTECTED]>wrote:

> It works!!!
>
> Thanks.
>
> 2008/10/29 hernan gonzalez <[EMAIL PROTECTED]>
>
> > I wrote  "validate programatically", it's rather trivial, though
> > perhaps does not mix well with
> > declarative validation, if you are using it. For example
> >
> >
> > public class MyAction extends ActionSupport implements Validateable  {
> >
> >  public String method1() throws Exception  {
> >       validate1();
> >       if(hasErrors()) return INPUT;
> >       ... // real method1 work
> >  }
> >
> >  public String method2() throws Exception  {
> >       validate2();
> >       if(hasErrors()) return INPUT;
> >       ... // real method1 work
> >  }
> >
> >
> >  public void validate1() {
> >         ...
> >  }
> >
> >  public void validate2() {
> >         ...
> >  }
> >
> >  public void validate () {
> >         // common validation for every method
> >   }
> >
> > }
> >
> >
> > On Wed, Oct 29, 2008 at 11:52 AM, Juanjo Cuadrado <[EMAIL PROTECTED]>
> > wrote:
> > > uuummm... yes... but.. how?
> > >
> > > have you documentation this?
> > >
> > > 2008/10/29 hernan gonzalez <[EMAIL PROTECTED]>
> > >
> > >> If you need to execute different validation for each method, would'n
> > >> it  be more
> > >> pertinent to validate programatically, invoking the corresponding
> > >> validation method
> > >> from each action method ?
> > >>
> > >>
> > >> On Wed, Oct 29, 2008 at 10:55 AM, Juanjo Cuadrado <
> [EMAIL PROTECTED]
> > >
> > >> wrote:
> > >> > Hi,
> > >> >
> > >> > I need to know how to recover (from the validation method) the name
> of
> > de
> > >> > action that has been invoked. I want to know the name of the method
> > that
> > >> > will be executed for this action (in the struts.xml I have put
> > diferents
> > >> > methods for the same action class).
> > >> >
> > >> > Thanks.
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Hernán J. González
> > >> http://hjg.com.ar/
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >> For additional commands, e-mail: [EMAIL PROTECTED]
> > >>
> > >>
> > >
> >
> >
> >
> > --
> > Hernán J. González
> > http://hjg.com.ar/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

Reply via email to