I am trying to change the layout velocity template for a certain request
by calling the jdata.setLayoutTemplate("content.vm"); call.
To my dismay I found that it wasn't changing the layout of the page for
the request.
When I tried to debug it I noticed the following code in
org.apache.jetspeed.modules.pages.JetspeedTemplatePage.doBuildAfterActio
n
 
            // get real path now - this is a fix to get us thru 1.3a2
            // when the TurbineTemplateService can locate resources by
NLS and mediatype,
            // then it can be removed
 
            String locatedScreen =
TemplateLocator.locateScreenTemplate(data, template);
            data.setScreenTemplate( locatedScreen );
            if ( logger.isDebugEnabled() )
            {
                logger.debug("JetspeedTemplatePage: calculated template
= " + locatedScreen);
            }
 
            String layout = TemplateLocator.locateLayoutTemplate(data,
template);
            data.setLayoutTemplate(layout);
            if ( logger.isDebugEnabled() )
            {
                logger.debug("JetspeedTemplatePage: layoutTemplate is
finally " + layout);
            }
 
The problem I see here is that it is using the screen template name to
attempt to find the layout template name because it doesn't check
rundata for the layout template before calling locateLayoutTemplate.
Could someone confirm if this is this a bug?  I am a newbie so I don't
want to break something because of my lack of understanding.
 
Thanks,
 
Chris
 
 

Reply via email to