You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frans Thamura <fr...@meruvian.org> on 2008/05/30 16:29:31 UTC

PRe Execute

hi there

i want to implement a execute before execute, we call it pre-execute

any idea to implement this?

i want to query to my Hibernate POJO to get the first execution

and if the execution success, the second execute can be run, if not,
the execption will show , said that the execute have return something

F

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: PRe Execute

Posted by Martin <mg...@hotmail.com>.
Frans

The interceptors execute before or after the action is called depending on 
how the stack is configured
take a look at
http://struts.apache.org/2.0.6/docs/interceptors.html

HTH
Martin
----- Original Message ----- 
From: "Jim Kiley" <jh...@summa-tech.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Friday, May 30, 2008 10:38 AM
Subject: Re: PRe Execute


> Hi Frans,
>
> Is this something you could do with the prepare() method of the Preparable
> interface?  Or is the problem more complex than that?
>
> jk
>
> On Fri, May 30, 2008 at 10:29 AM, Frans Thamura <fr...@meruvian.org> 
> wrote:
>
>> hi there
>>
>> i want to implement a execute before execute, we call it pre-execute
>>
>> any idea to implement this?
>>
>> i want to query to my Hibernate POJO to get the first execution
>>
>> and if the execution success, the second execute can be run, if not,
>> the execption will show , said that the execute have return something
>>
>> F
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> -- 
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: PRe Execute

Posted by Frans Thamura <fr...@meruvian.org>.
On Fri, May 30, 2008 at 9:42 PM, Ian Roughley <ia...@fdar.com> wrote:
> You could always use an interceptor, possibly with an annotation on the
> action if you only want the pre-execute method to be called for specific
> actions.


is there an example or glue to extend ActionSupport in interceptor?

and is there execute inside interceptor

sorry, for this, i never develop interceptor

F

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: PRe Execute

Posted by Ian Roughley <ia...@fdar.com>.
You could always use an interceptor, possibly with an annotation on the 
action if you only want the pre-execute method to be called for specific 
actions.

/Ian

Jim Kiley wrote:
> Hi Frans,
>
> Is this something you could do with the prepare() method of the Preparable
> interface?  Or is the problem more complex than that?
>
> jk
>
> On Fri, May 30, 2008 at 10:29 AM, Frans Thamura <fr...@meruvian.org> wrote:
>
>   
>> hi there
>>
>> i want to implement a execute before execute, we call it pre-execute
>>
>> any idea to implement this?
>>
>> i want to query to my Hibernate POJO to get the first execution
>>
>> and if the execution success, the second execute can be run, if not,
>> the execption will show , said that the execute have return something
>>
>> F
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: PRe Execute

Posted by Jim Kiley <jh...@summa-tech.com>.
Check this out -- about 3/4 of the way down there's a class that uses
Preparable, and beneath that a discussion of Preparable:
http://cwiki.apache.org/S2WIKI/struts-2-spring-2-jpa-ajax.html

On Fri, May 30, 2008 at 10:41 AM, Frans Thamura <fr...@meruvian.org> wrote:

> On Fri, May 30, 2008 at 9:38 PM, Jim Kiley <jh...@summa-tech.com> wrote:
> > Hi Frans,
> >
> > Is this something you could do with the prepare() method of the
> Preparable
> > interface?  Or is the problem more complex than that?
>
>
> cannot get it ;)
>
> can give me more detail, where is the info about prepare of interface
>
> my idea is to query (execute) one query, and the output will be come a
> logic for next execution
>
> execute()
>
> query the security access to database.....
>
> if query ok..
>  query again
>
> if not ok
>
>  show error
>
>
> F
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Re: PRe Execute

Posted by Frans Thamura <fr...@meruvian.org>.
On Fri, May 30, 2008 at 9:38 PM, Jim Kiley <jh...@summa-tech.com> wrote:
> Hi Frans,
>
> Is this something you could do with the prepare() method of the Preparable
> interface?  Or is the problem more complex than that?


cannot get it ;)

can give me more detail, where is the info about prepare of interface

my idea is to query (execute) one query, and the output will be come a
logic for next execution

execute()

query the security access to database.....

if query ok..
 query again

if not ok

 show error


F

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: PRe Execute

Posted by Jim Kiley <jh...@summa-tech.com>.
Hi Frans,

Is this something you could do with the prepare() method of the Preparable
interface?  Or is the problem more complex than that?

jk

On Fri, May 30, 2008 at 10:29 AM, Frans Thamura <fr...@meruvian.org> wrote:

> hi there
>
> i want to implement a execute before execute, we call it pre-execute
>
> any idea to implement this?
>
> i want to query to my Hibernate POJO to get the first execution
>
> and if the execution success, the second execute can be run, if not,
> the execption will show , said that the execute have return something
>
> F
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com