[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensymphony-sitemesh
Subject:    Re: [Opensymphony-sitemesh] Meta data in decorator
From:       "Matt Dowell" <mdowell () logicd ! com>
Date:       2004-03-26 14:25:48
Message-ID: 005a01c4133e$3bdd3770$650aa8c0 () mattnewdell
[Download RAW message or body]

Good work, thanks.


----- Original Message ----- 
From: "Scott Farquhar" <scott@atlassian.com>
To: "Mike Cannon-Brookes" <mike@atlassian.com>
Cc: <opensymphony-sitemesh@lists.sourceforge.net>
Sent: Friday, March 26, 2004 12:22 AM
Subject: Re: [Opensymphony-sitemesh] Meta data in decorator


> I found the problem.
>
> We currently move the page object into the PAGE scope on first access.
> This is so that you can use page:applyDecorator in decorators, and not
> have it messed up.
>
> If you use a non-static include, then you need to put your decorator tags
> in the same include.
>
> This can be worked around by editing AbstractTag, and commenting out a
> line:
>
>      60     protected Page getPage() {
>      61         Page p = (Page)pageContext.getAttribute(PAGE,
PageContext.PAGE_SCOPE);
>      62
>      63         if (p == null) {
>      64             p = (Page)pageContext.getAttribute(PAGE,
PageContext.REQUEST_SCOPE);
>      65             if (p == null) {
>      66                 pageContext.removeAttribute(PAGE,
PageContext.PAGE_SCOPE);
>      67             }
>      68             else {
>      69                 pageContext.setAttribute(PAGE, p,
PageContext.PAGE_SCOPE);
>      70             }
>      71             //pageContext.removeAttribute(PAGE,
PageContext.REQUEST_SCOPE);
>      72         }
>      73         return p;
>      74     }
>
> Cheers,
> Scott
>
> On Fri, Mar 26, 2004 at 11:18:19AM +1100, Mike Cannon-Brookes wrote:
> > Hrm - that shouldn't make any difference.
> >
> > Can you post some failing sample code of what you're trying to do?
> >
> > Cheers,
> > Mike
> >
> > --
> > ATLASSIAN - http://www.atlassian.com/
> >
> > Confluence - the professional J2EE wiki - tried it yet?
> > http://www.atlassian.com/confluence/
> >
> > On 26/03/2004, at 6:41 AM, Matt Dowell wrote:
> >
> > > Here's the file:
> > >
> > > <jsp:include page="head_inc.jsp"/>
> > > <jsp:include page="title_inc.jsp"/>
> > > <jsp:include page="body_inc.jsp"/>
> > > <jsp:include page="footer_inc.jsp"/>
> > >
> > >
> > > -----Original Message-----
> > > From: Joe Walnes [mailto:joe@truemesh.com]
> > > Sent: Thursday, March 25, 2004 1:38 PM
> > > To: Matt Dowell
> > > Cc: opensymphony-sitemesh@lists.sourceforge.net
> > > Subject: Re: [Opensymphony-sitemesh] Meta data in decorator
> > >
> > >
> > > Ermm.. dunno.
> > >
> > > Which type of includes are you using? <%@ include ... %> or
> > > <jsp:include
> > > ..>?
> > >
> > > Matt Dowell wrote:
> > >
> > >> Thanks everyone, I discovered the problem. If my decorator is made up
> > >> of includes, it will not pull the meta data, if there are no
includes.
> > >> It works. Resin 2.1.9.
> > >>
> > >> Is this a Resin bug?
> > >>
> > >> Matt
> > >>
> > >>
> > >> -----Original Message-----
> > >> From: Joe Walnes [mailto:joe@truemesh.com]
> > >> Sent: Thursday, March 25, 2004 1:08 PM
> > >> To: Matt Dowell
> > >> Cc: opensymphony-sitemesh@lists.sourceforge.net
> > >> Subject: Re: [Opensymphony-sitemesh] Meta data in decorator
> > >>
> > >>
> > >> Matt Dowell wrote:
> > >>
> > >>
> > >>
> > >>> Has anyone ever gotten a decorator to pull data from a meta tag like
> > >>> this:
> > >>>
> > >>> <meta name="author" content="test@example.com">
> > >>>
> > >>>
> > >>>
> > >>>
> > >> Using JSP:
> > >>    <decorator:getProperty property="meta.author"/>
> > >>
> > >> Using Velocity:
> > >>    $page.getProperty("meta.author")
> > >>
> > >> Using Java:
> > >>    page.getProperty("meta.author");
> > >>
> > >> -joe
> > >>
> > >>
> > >>
> > >> -------------------------------------------------------
> > >> This SF.Net email is sponsored by: IBM Linux Tutorials
> > >> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > >> GenToo technologies. Learn everything from fundamentals to system
> > >> administration.http://ads.osdn.com/?ad_id70&alloc_id638&opĚk
> > >> _______________________________________________
> > >> Opensymphony-sitemesh mailing list
> > >> Opensymphony-sitemesh@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/opensymphony-sitemesh
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by: IBM Linux Tutorials
> > > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > > GenToo technologies. Learn everything from fundamentals to system
> > > administration.http://ads.osdn.com/?ad_id70&alloc_id638&opĚk
> > > _______________________________________________
> > > Opensymphony-sitemesh mailing list
> > > Opensymphony-sitemesh@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/opensymphony-sitemesh
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President and CEO of
> > GenToo technologies. Learn everything from fundamentals to system
> > administration.http://ads.osdn.com/?ad_id70&alloc_id638&opĚk
> > _______________________________________________
> > Opensymphony-sitemesh mailing list
> > Opensymphony-sitemesh@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/opensymphony-sitemesh
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&opĚk
> _______________________________________________
> Opensymphony-sitemesh mailing list
> Opensymphony-sitemesh@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensymphony-sitemesh
>
>



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensymphony-sitemesh mailing list
Opensymphony-sitemesh@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensymphony-sitemesh
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic