WebSphere Portal Server - Setting a portlet's title programmatically

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > January 2004 > Setting a portlet's title programmatically





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Setting a portlet's title programmatically

2004-01-19, 2:55 pm

Hello everyone,

I need to write a portlet that sets its own title dynamically.. i.e. programmatically while the portlet is active. Is there a way to do it?

Your advice would be much appreciated!
Cheers
Colin
Pim

2004-01-19, 2:55 pm

Sure, use the doTitle(). You can print the title on the response.

Gr,

Pim
<cvella@crimsonwing.com> wrote in message
news:136273442.1054037378191.JavaMail.wasadmin@swg3ws006...
quote:

> Hello everyone,
>
> I need to write a portlet that sets its own title dynamically.. i.e.


programmatically while the portlet is active. Is there a way to do it?
quote:

>
> Your advice would be much appreciated!
> Cheers
> Colin




2004-01-19, 2:55 pm

Hi Pim,

You have definitely set me in the right direction.. thanks. I haven't done any experiments yet.. but do I need to handle rendering of the whole title bar i.e. with maximise, minimuse buttons etc? I really just need to have dynamic title text.
Michael Harris

2004-01-19, 2:55 pm

Portlets can't do that. If you need a custom titlebar, then you need a
custom skin just for that portlet.

<cvella@crimsonwing.com> wrote in message
news:532962864.1054042979886.JavaMail.wasadmin@swg3ws006...
quote:

> Hi Pim,
>
> You have definitely set me in the right direction.. thanks. I haven't done


any experiments yet.. but do I need to handle rendering of the whole title
bar i.e. with maximise, minimuse buttons etc? I really just need to have
dynamic title text.


Marco Beelen

2004-01-19, 2:55 pm

In the Control.jsp of each skin the placement and rendering of the titlebar
is handled.
Within that jsp a TAG <wps:portletTitle> is used.
The output of your doTitle() will be printed as a replacement for that tag.

So to change the text within the titlebat you don't need to worry about the
other features within the titlebar.

Marco


<cvella@crimsonwing.com> schreef in bericht
news:532962864.1054042979886.JavaMail.wasadmin@swg3ws006...
quote:

> Hi Pim,
>
> You have definitely set me in the right direction.. thanks. I haven't done


any experiments yet.. but do I need to handle rendering of the whole title
bar i.e. with maximise, minimuse buttons etc? I really just need to have
dynamic title text.


Michael Harris

2004-01-19, 2:55 pm

Sorry, I misread your question... No, you don't have to draw the entire
titlebar as other posts pointed out. I thought you said that you *DID* want
the portlet to draw the whole titlebar. My apologies.


2004-01-19, 2:55 pm

Hi,

I have not had the chance to try it out yet as I am very much in an analysis / design phase.. I hope to try it out soon.

Thanks to all of you guys for the support. I'll keep you posted!

Cheers,
Colin
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com