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
>getName()?
>
>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 - [EMAIL PROTECTED]
Professional Services Manager
Vivendi Universal Networks - Paris




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to