Agent decorator mapper

milant <[email protected]> Fri, 02 Sep 2005 11:10:07 CDT
Newsgroups gmane.comp.web.sitemesh.general,gmane.comp.lang.pnuts.user
Message-ID <4151687.1125677489206.JavaMail.os-j2ee@opensymphony01.contegix.com>
Hello.
I have several decorators within my application. And they work ok.
They are chosen by page decorator mapper.
However, I should use different decorator for PDA access to application.
I did not managed to make AgentDecoratorMapper to work.

<decorator-mappers>
		
		<mapper class="com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper">
            <param name="decorator.parameter" value="decorator" />
            <!-- <param name="parameter.name" value="confirm" />
            <param name="parameter.value" value="true" />-->
        </mapper> 
         

        <mapper class="com.opensymphony.module.sitemesh.mapper.PageDecoratorMapper">
            <param name="property.1" value="decorator" />
<!--             <param name="property.1" value="meta.decorator" />-->
        </mapper>

        <mapper class="com.opensymphony.module.sitemesh.mapper.AgentDecoratorMapper">
            <param name="match.Mozilla" value="palm" />
        </mapper>


Here is the part of sitemesh.xml. 
If I have correctly understand documentation this configuration should cause Mozilla to switch to {decorator-chosen-by-page-mapper}-palm.jsp decorator, and that is not a case.

Is there example on how to properly do this (choose decorator based on pagemapper, and then check agent decorator).

Thanks,
Milan

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=6375&messageID=14372#14372


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]