You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roberto Nunnari <ro...@supsi.ch> on 2007/09/24 16:24:03 UTC

Struts 2 and struts-menu

Hello list.

Is anybody successfully using struts-menu with Struts2?

Thank you.

-- 
Robi


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


RE: Struts 2 and struts-menu

Posted by mraible <ma...@raibledesigns.com>.
I agree that MenuContextListener is the best way to use Struts Menu in a
non-Struts 1.x environment.

Matt
Lead (and only) developer on Struts Menu ;-)


Al Sutton-4 wrote:
> 
> 1) I use the MenuContextListener
> 
> 2) I use static menus, but I believe there is something in the struts-menu
> FAQ that will help you.
> 
> Regards,
> 
> Al.
> 
> -----Original Message-----
> From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch] 
> Sent: 24 September 2007 15:52
> To: Struts Users Mailing List
> Subject: Re: Struts 2 and struts-menu
> 
> 
> Hi Al.
> Thank you for your time.
> 
> Glad to hear that ;) ..So here are a few more targeted questions:
> 
> 1) how do you integrate? Using Spring or MenuContextListener or else?
> 
> 2) is there a way to modify the menu links or add/set parameters to the 
> menu links at runtime?
> 
> Thank you again.
> 
> 
> Al Sutton wrote:
>> Yes.
>> 
>> -----Original Message-----
>> From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch]
>> Sent: 24 September 2007 15:24
>> To: Struts Users Mailing List
>> Subject: Struts 2 and struts-menu
>> 
>> 
>> Hello list.
>> 
>> Is anybody successfully using struts-menu with Struts2?
>> 
>> Thank you.
>> 
> 
> 
> -- 
> Robi
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts-2-and-struts-menu-tf4509539.html#a12863951
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Struts 2 and struts-menu

Posted by Roberto Nunnari <ro...@supsi.ch>.
Great. Thank you again, Al. :)

Best regards.

-- 
Robi


Al Sutton wrote:
> 1) I use the MenuContextListener
> 
> 2) I use static menus, but I believe there is something in the struts-menu
> FAQ that will help you.
> 
> Regards,
> 
> Al.
> 
> -----Original Message-----
> From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch] 
> Sent: 24 September 2007 15:52
> To: Struts Users Mailing List
> Subject: Re: Struts 2 and struts-menu
> 
> 
> Hi Al.
> Thank you for your time.
> 
> Glad to hear that ;) ..So here are a few more targeted questions:
> 
> 1) how do you integrate? Using Spring or MenuContextListener or else?
> 
> 2) is there a way to modify the menu links or add/set parameters to the 
> menu links at runtime?
> 
> Thank you again.
> 
> 
> Al Sutton wrote:
>> Yes.
>>
>> -----Original Message-----
>> From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch]
>> Sent: 24 September 2007 15:24
>> To: Struts Users Mailing List
>> Subject: Struts 2 and struts-menu
>>
>>
>> Hello list.
>>
>> Is anybody successfully using struts-menu with Struts2?
>>
>> Thank you.
>>
> 
> 



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


RE: Struts 2 and struts-menu

Posted by Al Sutton <al...@alsutton.com>.
1) I use the MenuContextListener

2) I use static menus, but I believe there is something in the struts-menu
FAQ that will help you.

Regards,

Al.

-----Original Message-----
From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch] 
Sent: 24 September 2007 15:52
To: Struts Users Mailing List
Subject: Re: Struts 2 and struts-menu


Hi Al.
Thank you for your time.

Glad to hear that ;) ..So here are a few more targeted questions:

1) how do you integrate? Using Spring or MenuContextListener or else?

2) is there a way to modify the menu links or add/set parameters to the 
menu links at runtime?

Thank you again.


Al Sutton wrote:
> Yes.
> 
> -----Original Message-----
> From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch]
> Sent: 24 September 2007 15:24
> To: Struts Users Mailing List
> Subject: Struts 2 and struts-menu
> 
> 
> Hello list.
> 
> Is anybody successfully using struts-menu with Struts2?
> 
> Thank you.
> 


-- 
Robi


---------------------------------------------------------------------
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: [Struts 2] Read request attribute in struts.xml

Posted by Jim Cushing <ji...@mac.com>.
Mark Menard's excellent Struts 2 Cookbook shows you how to do this.

http://www.vitarara.org/cms/struts_2_cookbook/post_and_redirect

If you've never seen his Cookbook, I definitely recommend taking a  
look. It's got some great tips.

On Sep 24, 2007, at 11:02 AM, Xibin Liu wrote:

>
> Hi, I set an attribute in the request in the action code, and I  
> want to
> use it in the struts.xml (see below). How can I reference it at the
> place marked by ***?
>
>
>         <action name="actionname" class="classname">
>             <result type="redirect">
> 				<param name="location">***</param>
> 				<param name="parse">true</param>
>             </result>
>         </action>
>
>
> I tried #request.attname, it did not work.
>
> Thanks!
>
> ---------------------------------------------------------------------
> 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: [Struts 2] Read request attribute in struts.xml

Posted by Xibin Liu <Xi...@pwgsc.gc.ca>.
I created a property for the attribute, then reference it by $propName,
and it works. Thanks Dave!

Also thanks Jim for pointing me to the struts 2 cookbook. That is a
great resource!


-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Monday, September 24, 2007 11:08 AM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Read request attribute in struts.xml

Xibin Liu wrote:
> Hi, I set an attribute in the request in the action code, and I want 
> to use it in the struts.xml (see below). How can I reference it at the

> place marked
by
> ***?
> 
> 
> <action name="actionname" class="classname">
>   <result type="redirect">
>     <param name="location">***</param>
>     <param name="parse">true</param>
>   </result>
> </action>

(Ugh, mixed tabs and spaces :p Tabs are bad enough! ;)

> I tried #request.attname, it did not work.

Did you try $request.attname or $parameters.attname?
The EL here is OGNL, but confusingly uses a "$"
instead of an "%".

Is there a particular reason you're putting it in the request instead of
making it an Action property? If it's a property referencing it with
$propName is known to work.

d.


---------------------------------------------------------------------
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: [Struts 2] Read request attribute in struts.xml

Posted by Dave Newton <ne...@yahoo.com>.
Xibin Liu wrote:
> Hi, I set an attribute in the request in the action
> code, and I want to use it in the struts.xml (see 
> below). How can I reference it at the place marked
by
> ***?
> 
> 
> <action name="actionname" class="classname">
>   <result type="redirect">
>     <param name="location">***</param>
>     <param name="parse">true</param>
>   </result>
> </action>

(Ugh, mixed tabs and spaces :p Tabs are bad enough! ;)

> I tried #request.attname, it did not work.

Did you try $request.attname or $parameters.attname?
The EL here is OGNL, but confusingly uses a "$"
instead of an "%".

Is there a particular reason you're putting it in the
request instead of making it an Action property? If
it's a property referencing it with $propName is known
to work.

d.


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


[Struts 2] Read request attribute in struts.xml

Posted by Xibin Liu <Xi...@pwgsc.gc.ca>.
Hi, I set an attribute in the request in the action code, and I want to
use it in the struts.xml (see below). How can I reference it at the
place marked by ***?


        <action name="actionname" class="classname">
            <result type="redirect">
				<param name="location">***</param>
				<param name="parse">true</param>
            </result>
        </action>


I tried #request.attname, it did not work.

Thanks!

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


Re: Struts 2 and struts-menu

Posted by Roberto Nunnari <ro...@supsi.ch>.
Hi Al.
Thank you for your time.

Glad to hear that ;) ..So here are a few more targeted questions:

1) how do you integrate? Using Spring or MenuContextListener or else?

2) is there a way to modify the menu links or add/set parameters to the 
menu links at runtime?

Thank you again.


Al Sutton wrote:
> Yes.
> 
> -----Original Message-----
> From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch] 
> Sent: 24 September 2007 15:24
> To: Struts Users Mailing List
> Subject: Struts 2 and struts-menu
> 
> 
> Hello list.
> 
> Is anybody successfully using struts-menu with Struts2?
> 
> Thank you.
> 


-- 
Robi


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


RE: Struts 2 and struts-menu

Posted by Al Sutton <al...@alsutton.com>.
Yes.

-----Original Message-----
From: Roberto Nunnari [mailto:roberto.nunnari@supsi.ch] 
Sent: 24 September 2007 15:24
To: Struts Users Mailing List
Subject: Struts 2 and struts-menu


Hello list.

Is anybody successfully using struts-menu with Struts2?

Thank you.

-- 
Robi


---------------------------------------------------------------------
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