incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe Lombart <christophe.lomb...@gmail.com>
Subject Re: template parameter lost/ignored
Date Thu, 05 May 2005 08:52:37 GMT
There are some bugs with the current code if you are running severals
graffito portlets. I'm reviewing the template & the portlets actions
management. I hope to commit asap.
In fact, I'm building a small portlet framework which provides a
cleaner code when the number of actions and templates used in a
portlet is important. If the Jetspeed committers are interesting, the
code will be donate to the Jetspeed project.

Can you wait a couple of days ? I will send a mail when the new code
is ready. I will try to write a small doc on this lightweight portlet
framework.

Christophe

On 5/5/05, Michael Neilly <mneilly@yahoo.com> wrote:
> 
> 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