Re: How to get the input action path?

2005-01-25 Thread Gianpiero Caretti
Kishore Senji wrote: As I use Jakarta Velocity I cannot use static fields such as org.apache.struts.Globals.MAPPING_KEY Please take a look at FieldMethodizer, which allows access to static fields from the template

Re: How to get the input action path?

2005-01-25 Thread Gianpiero Caretti
[Gianpiero] The only think I don't like with this solution is that the JSP writer has to know the existence of the command attribute into request. Moreover if the Action writer forgot to call the setup method the request attribute will not set. [Jeff Beal] You can use a custom RequestProcessor

How to get the input action path?

2005-01-24 Thread Gianpiero Caretti
Hi All, I need help about struts and tiles. I have an application using tiles and I have a jsp page that can be used as output page for several different actions. In this page I'd like to have a link to recall the input action (with different parameters). Something like ActionMapping.getPath()

Re: How to get the input action path?

2005-01-24 Thread fzlists
There will be a request attribute under the name org.apache.struts.action.mapping.instance. Call getPath() on that (after casting to an ActionMapping). I'd take a look around to see if there's a static method somewhere that gets this for you rather than coding the name of the attribute

Re: How to get the input action path?

2005-01-24 Thread Gianpiero Caretti
[EMAIL PROTECTED] wrote: There will be a request attribute under the name org.apache.struts.action.mapping.instance. Call getPath() on that (after casting to an ActionMapping). It works! Thanks to all, Gianpiero - To unsubscribe,

Re: How to get the input action path?

2005-01-24 Thread fzlists
Good news! :) FYI, all of my Actions call a common setup function at the start of execute(), and one of the things it does is set an attribute command in the request with the value of getPath() called on the ActionMapping. I use that in JSPs sometimes as you are doing, but I didn't want to

Re: How to get the input action path?

2005-01-24 Thread Gianpiero Caretti
[EMAIL PROTECTED] wrote: FYI, all of my Actions call a common setup function at the start of execute(), and one of the things it does is set an attribute command in the request with the value of getPath() called on the ActionMapping. FYI, that's exactly what I am doing rigth now! As I use Jakarta

Re: How to get the input action path?

2005-01-24 Thread Gianpiero Caretti
Gianpiero Caretti wrote: If you use jakarta velocity, another easy and probably less restricted solution could be to extend the StrutsLinkTool and register it into toolbox.xml instead of the standar link tool And using into the VM files directly the methods: $link.inputAction and

Re: How to get the input action path?

2005-01-24 Thread fzlists
On Mon, January 24, 2005 12:37 pm, Gianpiero Caretti said: FYI, that's exactly what I am doing rigth now! Great minds think alike :) The only think I don't like with this solution is that the JSP writer has to know the existence of the command attribute into request. Moreover if the

Re: How to get the input action path?

2005-01-24 Thread Kishore Senji
On Mon, 24 Jan 2005 18:37:35 +0100, Gianpiero Caretti [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: FYI, all of my Actions call a common setup function at the start of execute(), and one of the things it does is set an attribute command in the request with the value of getPath()

Re: How to get the input action path?

2005-01-24 Thread Jim Barrows
On Mon, 24 Jan 2005 10:05:08 -0800 (PST), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Mon, January 24, 2005 12:37 pm, Gianpiero Caretti said: FYI, that's exactly what I am doing rigth now! Great minds think alike :) The only think I don't like with this solution is that the JSP

Re: How to get the input action path?

2005-01-24 Thread Jeff Beal
Gianpiero Caretti wrote: [EMAIL PROTECTED] wrote: FYI, all of my Actions call a common setup function at the start of execute(), and one of the things it does is set an attribute command in the request with the value of getPath() called on the ActionMapping. The only think I don't like with

Re: How to get the input action path?

2005-01-24 Thread fzlists
I thought of something similar too Jim, but my thought was that now they are coding classes that don't truly adere to the general form of an Action. I would rather have the basic structure remain the same and just make them have to remember to call the setup code. Think of it this way... the

Re: How to get the input action path?

2005-01-24 Thread Jim Barrows
On Mon, 24 Jan 2005 10:24:56 -0800 (PST), [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I thought of something similar too Jim, but my thought was that now they are coding classes that don't truly adere to the general form of an Action. I would rather have the basic structure remain the same