struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpan Debroy" <arpan.deb...@gmail.com>
Subject Re: How to recover the action's name executed [SOLVED]
Date Tue, 04 Nov 2008 06:51:19 GMT
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 <jjcuadrado@gmail.com>wrote:

> It works!!!
>
> Thanks.
>
> 2008/10/29 hernan gonzalez <hgonzalez@gmail.com>
>
> > 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 <jjcuadrado@gmail.com>
> > wrote:
> > > uuummm... yes... but.. how?
> > >
> > > have you documentation this?
> > >
> > > 2008/10/29 hernan gonzalez <hgonzalez@gmail.com>
> > >
> > >> 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 <
> jjcuadrado@gmail.com
> > >
> > >> 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: user-unsubscribe@struts.apache.org
> > >> For additional commands, e-mail: user-help@struts.apache.org
> > >>
> > >>
> > >
> >
> >
> >
> > --
> > Hernán J. González
> > http://hjg.com.ar/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message