Chris Kimpton wrote:
> Hi,
>
> --- Rapha�l Luta <[EMAIL PROTECTED]> wrote:
>
>>
>>Chris Kimpton wrote:
>>
>>>
>>>In the advanced version I want to set the portlet title, so I
>>>
>>have
>>
>>>this code
>>>
>>>portlet.setTitle("Advanced Search");
>>>
>>>Where portlet is the VelocityPortlet parameter into the
>>>buildNormalContext method.
>>>
>>>This does not seem to work, I always get the title specified in
>>>
>>the
>>
>>>.xreg file...
>>>
>>>
>>It all depends on when do you try to set up the title:
>>- if it's during the the getContent() call, then it depends on the
>>control implementation
>> because if getContent is only called when needed, the portlet
>>title is already rendered...
>> If you're using on Velocity, you can modify the control template
>>to do something like
>> this :
>>
>>#if( ! $portlet.isClosed($data) )
>>
>
>>#set ($content = $portlet.getContent($data))
>>
>
> That worked great - but is there any overhead in doing this? That
> is, am I now building the content twice perhaps?
>
If you also modified the end of the control to use $content instead of
$portlet.getContent($data) then no, you have no penalty: You just build
the portlet content before the control content instead of building it
within the control content but you'll never be able to include 'direct
stream' portlets like JSP even when the Velocity/JSP is resolved.
--
Raphael Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Paris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]