Sitemesh : set property from decorated page for decorator

Discussion in 'Java' started by Zaza, Jul 4, 2008.

  1. Zaza

    Zaza Guest

    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.TokenizedHTMLPage'
    does not have the property 'theme'.

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

    Any idea ?

    Thanks,

    Xavier
    Zaza, Jul 4, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Sobol

    Sitemesh-like templating system for .NET?

    Steve Sobol, Mar 29, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    520
    Steve Sobol
    Mar 29, 2006
  2. Steve Sobol
    Replies:
    0
    Views:
    493
    Steve Sobol
    Mar 28, 2006
  3. OTB

    Sitemesh : replace logo

    OTB, Dec 20, 2006, in forum: Java
    Replies:
    2
    Views:
    352
    Steven J. Sobol
    Dec 20, 2006
  4. Suren
    Replies:
    5
    Views:
    719
    metaperl
    Oct 24, 2006
  5. Phlip
    Replies:
    2
    Views:
    289
    Phlip
    Oct 23, 2010
Loading...

Share This Page