You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Loup <Da...@performgroup.com> on 2008/09/01 11:50:48 UTC

Include menu action with sitemesh

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>
<li>menuitem 1 </li>
<li>menuitem 2 </li>
<li>menuitem 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 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.

RE: Include menu action with sitemesh

Posted by Matthew Seaborn <Ma...@performgroup.com>.
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:wesw@wantii.com]
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>
> <li>menuitem 1 </li>
> <li>menuitem 2 </li>
> <li>menuitem 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


________________________________________________________________________

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, 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Include menu action with sitemesh

Posted by Matthew Seaborn <Ma...@performgroup.com>.
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:wesw@wantii.com]
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>
> <li>menuitem 1 </li>
> <li>menuitem 2 </li>
> <li>menuitem 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


________________________________________________________________________

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, 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Include menu action with sitemesh

Posted by David Loup <Da...@performgroup.com>.
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>
 <title><decorator:title/></title>
 <!--
   Various scripts inclusions, JQuery, etc
 -->
 <s:head theme="ajax"/>
 <decorator:head />
</head>



-----Original Message-----
From: Wes Wannemacher [mailto:wesw@wantii.com]
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 <Da...@performgroup.com> 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:wesw@wantii.com]
> 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>
>> <li>menuitem 1 </li>
>> <li>menuitem 2 </li>
>> <li>menuitem 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ________________________________________________________________________
>
> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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


________________________________________________________________________

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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


________________________________________________________________________

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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Include menu action with sitemesh

Posted by David Loup <Da...@performgroup.com>.
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>
 <title><decorator:title/></title>
 <!--
   Various scripts inclusions, JQuery, etc
 -->
 <s:head theme="ajax"/>
 <decorator:head />
</head>



-----Original Message-----
From: Wes Wannemacher [mailto:wesw@wantii.com]
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 <Da...@performgroup.com> 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:wesw@wantii.com]
> 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>
>> <li>menuitem 1 </li>
>> <li>menuitem 2 </li>
>> <li>menuitem 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ________________________________________________________________________
>
> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



--
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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


________________________________________________________________________

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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Include menu action with sitemesh

Posted by Wes Wannemacher <we...@wantii.com>.
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 <Da...@performgroup.com> 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:wesw@wantii.com]
> 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>
>> <li>menuitem 1 </li>
>> <li>menuitem 2 </li>
>> <li>menuitem 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ________________________________________________________________________
>
> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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


RE: Include menu action with sitemesh

Posted by David Loup <Da...@performgroup.com>.
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:wesw@wantii.com]
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>
> <li>menuitem 1 </li>
> <li>menuitem 2 </li>
> <li>menuitem 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


________________________________________________________________________

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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Include menu action with sitemesh

Posted by Wes Wannemacher <we...@wantii.com>.
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>
> <li>menuitem 1 </li>
> <li>menuitem 2 </li>
> <li>menuitem 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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org