incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Neilly <mnei...@yahoo.com>
Subject template parameter lost/ignored
Date Thu, 05 May 2005 07:31:07 GMT

I'm using the graffito-browser application and have 
several instances of it in the deployment descriptor.
The first instance is simply the original graffitoBrowser
portlet. Following are several others that change
template.view.html.text to use a different velocity template.
When I initially visit the new portlets I see what I expect
which is the content retrieved from the database without the
portlet-menu div which identifies the document. If I visit
the graffitoBrowser portlet which uses the original template
and then return to the new portlets they now show the 
portlet-menu div. Viewing the parameters under the portlet
application manager clearly shows that each portlet has the
expected parameter setting for template.view.html.text yet
it appears that it is no longer being honored.

<portlet-app id="graffito-browser" version="1.0">
  <portlet id="graffitoBrowser">
        <description>Graffito Content Browser Portlet</description>
        <portlet-name>graffitoBrowser</portlet-name>
        <display-name>Graffito Browser</display-name>
        <portlet-class>org.apache.portals.graffito.portlets.BrowserPortlet</portlet-class>
        .
        .
        .
        <init-param>
                <name>template.view.html.text</name>
                <value>/WEB-INF/view/document/document-view-text-html.vm</value>
        </init-param>
        .
        .
        .
  </portlet>
  <portlet id="document-1">
        <description>document-l</description>
        <portlet-name>document-1</portlet-name>
        <display-name>document-1</display-name>
        <portlet-class>org.apache.portals.graffito.portlets.BrowserPortlet</portlet-class>
        .
        .
        .
        <init-param>
                <name>template.view.html.text</name>
                <value>/WEB-INF/view/document/document-view-text-html-no-loc.vm</value>
        </init-param>
        .
        .
        .
  </portlet>  
  <portlet id="document-2">
        <description>document-2</description>
        <portlet-name>document-2</portlet-name>
        <display-name>document-2</display-name>
        <portlet-class>org.apache.portals.graffito.portlets.BrowserPortlet</portlet-class>
        .
        .
        .
        <init-param>
                <name>template.view.html.text</name>
                <value>/WEB-INF/view/document/document-view-text-html-no-loc.vm</value>
        </init-param>
        .
        .
        .
  </portlet>
        

The difference in the template is simply that I remove the div that
identifies the document.

% diff -b view/document/document-view-text-html.vm view/document/document-view-text-html-noloc.vm
26d25
< <div class="portlet-menu">$MESSAGES.getString('div.path')
#cmsPathLink($browserDTO.getCurrentServer() $browserDTO.getFolderPath() $renderResponse $MESSAGES
) </div>

I'll probably end up taking a closer look at the template handling
code in BrowserPortlet.java but I suspect that someone here could either
point me in the right direction or resolve the issue in short order.



Mime
View raw message