RE: Include menu action with sitemesh

2008-09-10 Thread Matthew Seaborn
Found the solution: http://struts.apache.org/2.x/docs/action.html

-Original Message-
From: Matthew Seaborn
Sent: 08 September 2008 17:12
To: Struts Users Mailing List
Subject: RE: Include menu action with sitemesh

Whenever I try to us s:include or jsp:include to access a Struts 2 action from 
within the SiteMesh decorator I get

The requested resource (Relative URL) is not available.

Surely this should be possible.

-Original Message-
From: David Loup
Sent: 02 September 2008 12:55
To: Struts Users Mailing List
Subject: RE: Include menu action with sitemesh

Hi Wes,

Thanks for your reply.

Am using Struts 2.0.11, so I tried:

s:url id=menuUrl namespace=/menu action=menu/
s:div id=menuDiv href=%{menuUrl} /

Since I think sx tags only work with the Dojo plugin in Struts 2.1.

However, I'm not getting any error (Java or JS), but the DIV remains 
desperately empty.

Any idea?


-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 02:21
To: Struts Users Mailing List
Subject: Re: Include menu action with sitemesh

David,

I use S2 tags all the time in my sitemesh decorators. When I first did
it, I hadn't put much thought into it (maybe the filter won't be
available to sitemesh, the action is the decorated page, not the
decorator, etc.), I just did it and it worked. It wasn't until later
that I thought maybe it wasn't right. However, it worked fine and I have
been happily doing it since. Rather than -

div id=menuDiv
  s:action name=menu /
/div

Why not use the sx:div / tag?

http://struts.apache.org/2.x/docs/ajax-div-template.html

Just be careful that the menu action does not get decorated by Sitemesh,
otherwise the result can be pretty bizarre :)

-Wes

On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to all 
 my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those of 
 the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient?s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments

RE: Include menu action with sitemesh

2008-09-08 Thread Matthew Seaborn
Whenever I try to us s:include or jsp:include to access a Struts 2 action from 
within the SiteMesh decorator I get

The requested resource (Relative URL) is not available.

Surely this should be possible.

-Original Message-
From: David Loup
Sent: 02 September 2008 12:55
To: Struts Users Mailing List
Subject: RE: Include menu action with sitemesh

Hi Wes,

Thanks for your reply.

Am using Struts 2.0.11, so I tried:

s:url id=menuUrl namespace=/menu action=menu/
s:div id=menuDiv href=%{menuUrl} /

Since I think sx tags only work with the Dojo plugin in Struts 2.1.

However, I'm not getting any error (Java or JS), but the DIV remains 
desperately empty.

Any idea?


-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 02:21
To: Struts Users Mailing List
Subject: Re: Include menu action with sitemesh

David,

I use S2 tags all the time in my sitemesh decorators. When I first did
it, I hadn't put much thought into it (maybe the filter won't be
available to sitemesh, the action is the decorated page, not the
decorator, etc.), I just did it and it worked. It wasn't until later
that I thought maybe it wasn't right. However, it worked fine and I have
been happily doing it since. Rather than -

div id=menuDiv
  s:action name=menu /
/div

Why not use the sx:div / tag?

http://struts.apache.org/2.x/docs/ajax-div-template.html

Just be careful that the menu action does not get decorated by Sitemesh,
otherwise the result can be pretty bizarre :)

-Wes

On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to all 
 my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those of 
 the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient?s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.



CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential

RE: Include menu action with sitemesh

2008-09-02 Thread David Loup
Hi Wes,

Thanks for your reply.

Am using Struts 2.0.11, so I tried:

s:url id=menuUrl namespace=/menu action=menu/
s:div id=menuDiv href=%{menuUrl} /

Since I think sx tags only work with the Dojo plugin in Struts 2.1.

However, I'm not getting any error (Java or JS), but the DIV remains 
desperately empty.

Any idea?


-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 02:21
To: Struts Users Mailing List
Subject: Re: Include menu action with sitemesh

David,

I use S2 tags all the time in my sitemesh decorators. When I first did
it, I hadn't put much thought into it (maybe the filter won't be
available to sitemesh, the action is the decorated page, not the
decorator, etc.), I just did it and it worked. It wasn't until later
that I thought maybe it wasn't right. However, it worked fine and I have
been happily doing it since. Rather than -

div id=menuDiv
  s:action name=menu /
/div

Why not use the sx:div / tag?

http://struts.apache.org/2.x/docs/ajax-div-template.html

Just be careful that the menu action does not get decorated by Sitemesh,
otherwise the result can be pretty bizarre :)

-Wes

On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to all 
 my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those of 
 the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Include menu action with sitemesh

2008-09-02 Thread Wes Wannemacher
You're right, sx: is 2.1, in 2.0.x, the ajax theme was bundled.

What theme are you using? What does your s:head / tag look like?
Have you tried loading up in Firebug?

-Wes

On Tue, Sep 2, 2008 at 7:54 AM, David Loup [EMAIL PROTECTED] wrote:
 Hi Wes,

 Thanks for your reply.

 Am using Struts 2.0.11, so I tried:

 s:url id=menuUrl namespace=/menu action=menu/
 s:div id=menuDiv href=%{menuUrl} /

 Since I think sx tags only work with the Dojo plugin in Struts 2.1.

 However, I'm not getting any error (Java or JS), but the DIV remains 
 desperately empty.

 Any idea?


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: 02 September 2008 02:21
 To: Struts Users Mailing List
 Subject: Re: Include menu action with sitemesh

 David,

 I use S2 tags all the time in my sitemesh decorators. When I first did
 it, I hadn't put much thought into it (maybe the filter won't be
 available to sitemesh, the action is the decorated page, not the
 decorator, etc.), I just did it and it worked. It wasn't until later
 that I thought maybe it wasn't right. However, it worked fine and I have
 been happily doing it since. Rather than -

 div id=menuDiv
  s:action name=menu /
 /div

 Why not use the sx:div / tag?

 http://struts.apache.org/2.x/docs/ajax-div-template.html

 Just be careful that the menu action does not get decorated by Sitemesh,
 otherwise the result can be pretty bizarre :)

 -Wes

 On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to 
 all my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete 
 them from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained 
 as a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those 
 of the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipient's responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those of 
 the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Wesley Wannemacher
President, Head Engineer/Consultant

RE: Include menu action with sitemesh

2008-09-02 Thread David Loup
Yup, firebug doesn't report any errors.
When looking at the Net tab, it shows the page fetching my JS files, but not 
hitting the menu.action, though.


My head tag looks like:
head
 titledecorator:title//title
 !--
   Various scripts inclusions, JQuery, etc
 --
 s:head theme=ajax/
 decorator:head /
/head



-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 13:55
To: Struts Users Mailing List
Subject: Re: Include menu action with sitemesh

You're right, sx: is 2.1, in 2.0.x, the ajax theme was bundled.

What theme are you using? What does your s:head / tag look like?
Have you tried loading up in Firebug?

-Wes

On Tue, Sep 2, 2008 at 7:54 AM, David Loup [EMAIL PROTECTED] wrote:
 Hi Wes,

 Thanks for your reply.

 Am using Struts 2.0.11, so I tried:

 s:url id=menuUrl namespace=/menu action=menu/
 s:div id=menuDiv href=%{menuUrl} /

 Since I think sx tags only work with the Dojo plugin in Struts 2.1.

 However, I'm not getting any error (Java or JS), but the DIV remains 
 desperately empty.

 Any idea?


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: 02 September 2008 02:21
 To: Struts Users Mailing List
 Subject: Re: Include menu action with sitemesh

 David,

 I use S2 tags all the time in my sitemesh decorators. When I first did
 it, I hadn't put much thought into it (maybe the filter won't be
 available to sitemesh, the action is the decorated page, not the
 decorator, etc.), I just did it and it worked. It wasn't until later
 that I thought maybe it wasn't right. However, it worked fine and I have
 been happily doing it since. Rather than -

 div id=menuDiv
  s:action name=menu /
 /div

 Why not use the sx:div / tag?

 http://struts.apache.org/2.x/docs/ajax-div-template.html

 Just be careful that the menu action does not get decorated by Sitemesh,
 otherwise the result can be pretty bizarre :)

 -Wes

 On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to 
 all my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete 
 them from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained 
 as a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those 
 of the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipient's responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any

RE: Include menu action with sitemesh

2008-09-02 Thread David Loup
Got it.
Works way better with theme=ajax in the s:div tag...


-Original Message-
From: David Loup
Sent: 02 September 2008 14:22
To: Struts Users Mailing List
Subject: RE: Include menu action with sitemesh

Yup, firebug doesn't report any errors.
When looking at the Net tab, it shows the page fetching my JS files, but not 
hitting the menu.action, though.


My head tag looks like:
head
 titledecorator:title//title
 !--
   Various scripts inclusions, JQuery, etc
 --
 s:head theme=ajax/
 decorator:head /
/head



-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 13:55
To: Struts Users Mailing List
Subject: Re: Include menu action with sitemesh

You're right, sx: is 2.1, in 2.0.x, the ajax theme was bundled.

What theme are you using? What does your s:head / tag look like?
Have you tried loading up in Firebug?

-Wes

On Tue, Sep 2, 2008 at 7:54 AM, David Loup [EMAIL PROTECTED] wrote:
 Hi Wes,

 Thanks for your reply.

 Am using Struts 2.0.11, so I tried:

 s:url id=menuUrl namespace=/menu action=menu/
 s:div id=menuDiv href=%{menuUrl} /

 Since I think sx tags only work with the Dojo plugin in Struts 2.1.

 However, I'm not getting any error (Java or JS), but the DIV remains 
 desperately empty.

 Any idea?


 -Original Message-
 From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
 Sent: 02 September 2008 02:21
 To: Struts Users Mailing List
 Subject: Re: Include menu action with sitemesh

 David,

 I use S2 tags all the time in my sitemesh decorators. When I first did
 it, I hadn't put much thought into it (maybe the filter won't be
 available to sitemesh, the action is the decorated page, not the
 decorator, etc.), I just did it and it worked. It wasn't until later
 that I thought maybe it wasn't right. However, it worked fine and I have
 been happily doing it since. Rather than -

 div id=menuDiv
  s:action name=menu /
 /div

 Why not use the sx:div / tag?

 http://struts.apache.org/2.x/docs/ajax-div-template.html

 Just be careful that the menu action does not get decorated by Sitemesh,
 otherwise the result can be pretty bizarre :)

 -Wes

 On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to 
 all my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete 
 them from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained 
 as a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those 
 of the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned

Re: Include menu action with sitemesh

2008-09-01 Thread Wes Wannemacher
David,

I use S2 tags all the time in my sitemesh decorators. When I first did
it, I hadn't put much thought into it (maybe the filter won't be
available to sitemesh, the action is the decorated page, not the
decorator, etc.), I just did it and it worked. It wasn't until later
that I thought maybe it wasn't right. However, it worked fine and I have
been happily doing it since. Rather than -

div id=menuDiv
  s:action name=menu /
/div

Why not use the sx:div / tag? 

http://struts.apache.org/2.x/docs/ajax-div-template.html

Just be careful that the menu action does not get decorated by Sitemesh,
otherwise the result can be pretty bizarre :)

-Wes

On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,
 
 I'm using sitemesh with struts 2 and am currently applying a decorator to all 
 my actions, including a static menu in a div.
 
 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div
 
 What I want to do is make that menu build dynamically to have, in spirit:
 
 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div
 
 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?
 
 Thanks
 D
 
 
 
 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.
 
 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.
 
 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.
 
 AUTHORITY - Any views or opinions expressed in this email are solely those of 
 the sender and do not necessarily represent those of Perform Group.
 
 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]