Hmmm... Would this be a good place to sub-class generic portlet to override 
that method, rather than build a uPortal bolt-on via the publication?  We could 
create a uPortalPortlet that sub-classes GenericPortlet.  In this case, it 
would result a similar change in behavior for the implementer, in that... they 
would have to change the publication.xml to put this in place; however, it 
would seem a little less kludgy to me.

Just a thought, in the interest of continuing dialogue on this thread.  Build 
it up or Shoot it down...  BANG!



On May 7, 2010, at 10:58 AM, Eric Dalquist wrote:

> The problem is that would require re-writing GenericPortlet which is part of 
> the portlet specification. To uPortal your portlet code calling setTitle, or 
> GenericPortlet calling setTitle look the same, there is no way to tell the 
> difference.
> 
> The logic in the portal is that if the title was set for the portlet during 
> that request that is used, if not or if useDynamicTitles is false for that 
> portlet the value from portlet manager is used.
> 
> -Eric
> 
> On 05/07/2010 10:54 AM, Gherna, Andrew Robert wrote:
>> Moving this uportal-dev...
>> 
>> This is a great feature, one I've wanted for a long time.  I'm glad it's
>> available and it's going to make our portal that much better.
>> 
>> But I have a few questions about how uPortal eventually decides which title
>> to use for a portlet publication.  I think I understand the flow for
>> determining the portlet title.  But it seems like the value of the
>> name/title in the channel-definition is being left out when it comes to
>> published instances of portlets.  I understand that there is a parameter you
>> can use to disable the portlet titles entirely and use the channel name
>> instead.  But this is completely separated from the portlet in this instance
>> (you either use it or you don't).
>> 
>> What's keeping publication titles from being used when determining the title
>> of a portlet or publication?  In other words, merge it as a fallback into
>> the conditional chain that is in place now.
>> 
>> As it is now:  MyPortlet.render or
>> MyPortlet.doXXX->RenderResponse.setTitle(),
>> GenericPortlet.render->RenderResponse.setTitle(), portlet.xml->portlet-name
>> value.
>> 
>> As it could be:  MyPortlet.render->RenderResponse.setTitle(),
>> GenericPortlet.render->RenderResponse.setTitle(), Publication Title,
>> portlet.xml->portlet-name value.
>> 
>> 
>> 
>> 
>> On 5/6/10 6:54 PM, "Eric Dalquist"<[email protected]>  wrote:
>> 
>>   
>>> Correct.
>>> 
>>> On 5/6/10 5:04 PM, Gherna, Andrew Robert wrote:
>>>     
>>>> Found this in our xsls (it was disabled).  This will help us out a lot.
>>>> Thanks!
>>>> 
>>>> I'm assuming that disableDynamicTitle set to true will use the title in the
>>>> channel definition.  Is this correct?
>>>> 
>>>> On 5/6/10 4:55 PM, "Eric Dalquist"<[email protected]>   wrote:
>>>> 
>>>> 
>>>>       
>>>>> There is a special text token that the XSL needs to be in place anywhere
>>>>> you want a dynamic title to be used:
>>>>> 
>>>>> UP:CHANNEL_TITLE-{<xsl:value-of select="@ID" />}
>>>>> 
>>>>> -Eric
>>>>> 
>>>>> On 5/6/10 4:52 PM, Gherna, Andrew Robert wrote:
>>>>> 
>>>>>         
>>>>>> Yes.
>>>>>> 
>>>>>> On 5/6/10 4:52 PM, "Eric Dalquist"<[email protected]>    wrote:
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>           
>>>>>>> Do you have a custom theme XSL?
>>>>>>> 
>>>>>>> On 5/6/10 4:49 PM, Gherna, Andrew Robert wrote:
>>>>>>> 
>>>>>>> 
>>>>>>>             
>>>>>>>> The portlet Cris mentioned is in uPortal 3.1.1.  I put it into my
>>>>>>>> workstation's uPortal and tried the Dynamic Title Test.  The Action 
>>>>>>>> Title
>>>>>>>> and
>>>>>>>> Render Title both change, but the actual channel title does not.  Am I
>>>>>>>> missing something here?
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 5/6/10 4:13 PM, "Andy Gherna"<[email protected]>     wrote:
>>>>>>>> 
>>>>>>>> This is for uPortal 3.1.1.
>>>>>>>> 
>>>>>>>> Right, I'm aware that in render(), the title of the portlet is set and
>>>>>>>> then
>>>>>>>> the doDispatch method is called.  My setTitle should happen after that
>>>>>>>> one.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 5/6/10 4:09 PM, "Cris J Holdorph"<[email protected]>     wrote:
>>>>>>>> 
>>>>>>>> which version of uPortal?  Dynamic titles were a fairly recent 
>>>>>>>> addition.
>>>>>>>>      uPortal 3.1.x maybe?  I also think that after they were added and
>>>>>>>> working, there was a regression that caused them to not work for a 
>>>>>>>> short
>>>>>>>> time.
>>>>>>>> 
>>>>>>>> Also if you extend GenericPortlet, you need to be aware that it does
>>>>>>>> some stuff with setting the title and you have to be careful it's not
>>>>>>>> overwriting the title you're trying to set manually.
>>>>>>>> 
>>>>>>>> There's a test portlet that ships in 3.2.x, it might be in 3.1.x, that
>>>>>>>> demonstrates the dynamic title functionality.  I'd make sure to test
>>>>>>>> with that portlet to determine if it works at all in your portal.
>>>>>>>> 
>>>>>>>> ---- Cris J H
>>>>>>>> 
>>>>>>>> Gherna, Andrew Robert wrote:
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>               
>>>>>>>>> How do you enable dynamic channel titles for portlets?  I have a 
>>>>>>>>> portlet
>>>>>>>>> that calls RenderResponse.setTitle("title"); but just calling this
>>>>>>>>> method
>>>>>>>>> wasn't working.  I saw a channel definition document that had:
>>>>>>>>> 
>>>>>>>>>        <parameter>
>>>>>>>>>          <name>disableDynamicTitle</name>
>>>>>>>>>          <value>false</value>
>>>>>>>>>          <description/>
>>>>>>>>>          <ovrd>N</ovrd>
>>>>>>>>>        </parameter>
>>>>>>>>> 
>>>>>>>>> but putting that into my channel definition and importing it did not
>>>>>>>>> seem
>>>>>>>>> to
>>>>>>>>> have any affect at all.  Is this the right parameter to use?
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>                 
>>>>>>>> ---
>>>>>>>> You are currently subscribed to [email protected] as:
>>>>>>>> [email protected]
>>>>>>>> To unsubscribe, change settings or access archives, see
>>>>>>>> http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>>>>>>> 
>>>>>>>> 
>>>>>>>> ---
>>>>>>>> You are currently subscribed to [email protected] as:
>>>>>>>> [email protected]
>>>>>>>> To unsubscribe, change settings or access archives, see
>>>>>>>> http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> ---
>>>>>>>> You are currently subscribed to [email protected] as:
>>>>>>>> [email protected]
>>>>>>>> To unsubscribe, change settings or access archives, see
>>>>>>>> http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>               
>>>>>>> 
>>>>>>>             
>>>>>> ---
>>>>>> You are currently subscribed to [email protected] as:
>>>>>> [email protected]
>>>>>> To unsubscribe, change settings or access archives, see
>>>>>> http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>           
>>>>> 
>>>>>         
>>>> ---
>>>> You are currently subscribed to [email protected] as:
>>>> [email protected]
>>>> To unsubscribe, change settings or access archives, see
>>>> http://www.ja-sig.org/wiki/display/JSG/uportal-user
>>>> 
>>>> 
>>>>       
>>>     
>> 
>>   
> 


-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to