Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Sitemesh : set property from decorated page for decorator

Reply
Thread Tools

Sitemesh : set property from decorated page for decorator

 
 
Zaza
Guest
Posts: n/a
 
      07-04-2008
Hi,

I'm using sitemesh.

I have a main.jsp for the main template, to add header and footer to
each page.

In header.jsp, I need an information (the "theme" of the page) that
must be provided by each decorated page. I don't find how to set, in
each decorated page, a "theme" property, that I can retrieve in
main.jsp (for exemple with "${thePage.theme}") avec give this property
to header.jsp.

I have searched, something arround this line in main.jsp :

<decorator:usePage id="thePage" />
<page:applyDecorator name="include" page="decorations/Header.html?
theme=${thePage.theme}" />

but I have this error :

The class 'com.opensymphony.module.sitemesh.parser.Tokenized HTMLPage'
does not have the property 'theme'.

and I don't find how to set "theme" property in each decorated page.

Any idea ?

Thanks,

Xavier
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a method into a property without using the @property decorator Phlip Python 2 10-23-2010 05:25 PM
Sitemesh : replace logo OTB Java 2 12-20-2006 07:51 PM
HTML Templates (Sitemesh/Tiles concept) in Python Suren Python 5 10-24-2006 01:43 PM
Sitemesh-like templating system for .NET? Steve Sobol ASP .Net 0 03-29-2006 02:52 AM
Sitemesh-like templating system for .NET? Steve Sobol Java 0 03-28-2006 08:29 PM



Advertisments