public void
contributeMarkupRenderer(OrderedConfiguration<MarkupRendererFilter>
configuration,
                                         final MetaDataLocator
metaDataLocator,
                                         final ComponentEventLinkEncoder
linkEncoder,
                                         final RequestGlobals globals)
    {
        configuration.add(NO_MARKUP_SYMBOL,
            new MarkupRendererFilter()
            {
                @Override
                public void renderMarkup(MarkupWriter writer, MarkupRenderer
renderer) {
                    PageRenderRequestParameters parameters =
linkEncoder.decodePageRenderRequest(globals.getRequest());

                    boolean noMarkup =
metaDataLocator.findMeta(NO_MARKUP_SYMBOL, parameters.getLogicalPageName(),

Boolean.class);

Not sure if this available in T5.1, but you can try this. I believe
"parameters.getLogicalPageName()" is what you need.

On Fri, May 7, 2010 at 17:58, Steve Eynon <steve.ey...@googlemail.com>wrote:

> Hello,
>
> I'm looking at ways to automatically insert the name of the page being
> rendered into each page (so my selenium tests can check the correct
> page was finally rendered). This was done using a component I placed
> on each page but I'm looking for a more elegant solution.
>
> I've tried contributing a MarkupRendererFilter to add my tag via
> writer.getDocument(). The only way I know to get hold of the current
> page name is through ComoponentResources.getPageName(). But
> ComoponentResources wasn't in the Environment and doesn't seem to be
> "Shadowed" either.
>
> Is MarkupRendererFilter the right object to contribute for this? And
> if so, where would I get the current Page name from?
>
> Cheers,
>
> Steve.
> --
> Steve Eynon
> mobie: (+592) 678 4236
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com

Reply via email to