portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raphael.l...@networks.groupvu.com
Subject Re: Question in VelocityPortletControl
Date Sun, 01 Apr 2001 14:44:46 GMT
Glenn Golden wrote:

>Here's code from VelocityPortletControl.getContent():
>        if ( portlet.getName().equals(jdata.getCustomized())
>             && (!portlet.providesCustomization()) )
>        {            
>            context.put("portlet",JetspeedTool.getCustomizer(portlet));
>        }
>        else
>        {
>            context.put("portlet", portlet );
>        }
>What is the first part of the "if" supposed to mean?
>Portlet (Portlet) .getName() is a string
>jdata (JetspeedRunData) .getCustomized() is a Portlet!
>Are we really counting on the ".toString()" behavior of Portlet to match the
>What am I missing here?
>I'm not really sure what this code is doing - It caught my attention because
>it's portlet name based, not peid.
>Does anybody know what this is for and doing?

I guess the type mismatch is caused by the fact that the 
JetspeedRunData.getCustomized() changed it's return type several times 
during development... so it's defintiely a bug you uncovered :(

The idea of this code snippet was :

if the portlet this contol wraps is currently being customized and does 
not provides it own customizer, then the control will load the default 
customizer (invoked through JetspeeedTool)
for this portlet, else it'll load the portlet itself (which can be its 
own customizer).

Raphaƫl Luta - raphael.luta@networks.groupvu.com
Professional Services Manager
Vivendi Universal Networks - Paris

To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>

View raw message