Ilyas Patel
unread,Jun 4, 2012, 8:58:14 PM6/4/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SiteMesh 3 Users
I have created a custom decorator mapper and added to my sitemesh.xml
file. When I view the println statements it still defaults to
com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper class
which I am also using but not from my new mapper.
Looking through the SiteMesh code I couldn't understand why it is
defaulting to this class. I can't see where the parent values come
from. Does anyone else have any ideas?
-----
public final class PartnerDecoratorMapper extends
AbstractDecoratorMapper {
private String decorator = null;
public void init(Config config, Properties properties,
DecoratorMapper parent) throws InstantiationException {
super.init(config, properties, parent);
System.out.println("In init : " +
this.parent.toString()); // .mapper.ConfigDecoratorMapper@e736cbe
}
public Decorator getDecorator(HttpServletRequest request, Page
page) {
System.out.println("Decorator name : " +
super.getDecorator(request, page).getName()); // noSidebar
System.out.println("Decorator page : " +
super.getDecorator(request, page).getPage()); // /decorators/
noSidebar.jsp
return super.getDecorator(request, page);
}
}
-----
<mapper
class="com.efinancialcareers.myefc.core.filters.PartnerDecoratorMapper">
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="${decorators-file}"/>
</mapper>
Thanks