You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by Jason Novotny <no...@aei.mpg.de> on 2004/01/08 18:46:27 UTC
confusion on rendering
Hi all,
I'm a little confused about the sequence of rendering according to
the JSR spec. Once again, i'm coming from the WebSphere background where
there is an extra portlet lifecycle method called "doTitle" which can be
overriden to provide any customized title. It seems that the container
during portlet rendering can start creating a title bar, often a HTML
table, then invoke the doTitle method and then invoke the appropriate
doXXX method. Now looking at the JSR, it seems that one can set the
title in the PortletResponse during the doXXX method. As someone
developing a portlet container this seems a little tricky to me since I
would somehow be required to cache portlet content being generated in
the doXXX and then pull out the title from the response, render it and
then continue rendering the rest of the doXXX output.. does this make
any sense? What am I missing here?
Thanks for your time, Jason
Re: confusion on rendering
Posted by Stefan Hepper <st...@hursley.ibm.com>.
Hi Jason,
as said the pluto demo portal ignores this currently. However, the
portal calling the portlet container can give the container a buffered
stream. In the pluto portal impl this can be fixed in the
org.apache.pluto.portalImpl.aggregation.PortletFragment class, where one
would call the portlet before writing the title with a buffered response
instead of the real servlet response.
Stefan
Jason Novotny wrote:
>
> Hi Stefan,
>
> So where does this buffering take place, exactly at the pluto
> level or the portal level? I'm sort of comparing the
> PortletResponseImpl in pluto to my own-- I see pluto uses a
> PrintWriterServletOutputStream internally but it doesn't look like the
> portal (jetspeed or whatever) can get to the actual content being
> written.. my initial inclination is to use some kind of proxy myself
> internally so that one would in essence have to do a flush to have to
> have the output catually written, so that it can be stored and
> reformatted..similar I guess to how JSTL classes work.
>
> Thanks, Jason
>
> Stefan Hepper wrote:
>
>> That's life in a standardization group...
>> At some time when the opinions are too far apart you can only put in
>> the bare minimum that everyone feels comfortable with in order to make
>> further progress on other topics and get the spec out the door.
>>
>> Stefan
>>
>> Jason Novotny wrote:
>>
>>>
>>> Well, thats really annoying. You mean as a container developer, I
>>> have to do more work AND I don't get the benefit of having doTitle as
>>> a lifecycle method that would allow me to display anything I want in
>>> the titlebar? ;-)
>>>
>>> Oh well, thanks for your response, Jason
>>>
>>> Stefan Hepper wrote:
>>>
>>>> Hi Jason,
>>>> no, you are correct, this is more complicated for the container and
>>>> requires buffering. That's the reason why the pluto portal sample
>>>> implementation ignores the title that you set it in the response.
>>>> The Expert Group viewed a new lifecycle method for setting the title
>>>> as overkill. Also there were a lot discussions about what a title
>>>> really is. Note that the current spec version only allows text
>>>> titles, you cannot have a title that consists of text and a gif, or
>>>> text and a sound. This is something to work on in the next spec
>>>> version.
>>>>
>>>> Stefan
>>>>
>>>>
>>>> Jason Novotny wrote:
>>>>
>>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm a little confused about the sequence of rendering according
>>>>> to the JSR spec. Once again, i'm coming from the WebSphere
>>>>> background where there is an extra portlet lifecycle method called
>>>>> "doTitle" which can be overriden to provide any customized title.
>>>>> It seems that the container during portlet rendering can start
>>>>> creating a title bar, often a HTML table, then invoke the doTitle
>>>>> method and then invoke the appropriate doXXX method. Now looking at
>>>>> the JSR, it seems that one can set the title in the PortletResponse
>>>>> during the doXXX method. As someone developing a portlet container
>>>>> this seems a little tricky to me since I would somehow be required
>>>>> to cache portlet content being generated in the doXXX and then pull
>>>>> out the title from the response, render it and then continue
>>>>> rendering the rest of the doXXX output.. does this make any sense?
>>>>> What am I missing here?
>>>>>
>>>>> Thanks for your time, Jason
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
Re: confusion on rendering
Posted by Jason Novotny <no...@aei.mpg.de>.
Hi Stefan,
So where does this buffering take place, exactly at the pluto
level or the portal level? I'm sort of comparing the
PortletResponseImpl in pluto to my own-- I see pluto uses a
PrintWriterServletOutputStream internally but it doesn't look like the
portal (jetspeed or whatever) can get to the actual content being
written.. my initial inclination is to use some kind of proxy myself
internally so that one would in essence have to do a flush to have to
have the output catually written, so that it can be stored and
reformatted..similar I guess to how JSTL classes work.
Thanks, Jason
Stefan Hepper wrote:
> That's life in a standardization group...
> At some time when the opinions are too far apart you can only put in
> the bare minimum that everyone feels comfortable with in order to make
> further progress on other topics and get the spec out the door.
>
> Stefan
>
> Jason Novotny wrote:
>
>>
>> Well, thats really annoying. You mean as a container developer, I
>> have to do more work AND I don't get the benefit of having doTitle as
>> a lifecycle method that would allow me to display anything I want in
>> the titlebar? ;-)
>>
>> Oh well, thanks for your response, Jason
>>
>> Stefan Hepper wrote:
>>
>>> Hi Jason,
>>> no, you are correct, this is more complicated for the container and
>>> requires buffering. That's the reason why the pluto portal sample
>>> implementation ignores the title that you set it in the response.
>>> The Expert Group viewed a new lifecycle method for setting the title
>>> as overkill. Also there were a lot discussions about what a title
>>> really is. Note that the current spec version only allows text
>>> titles, you cannot have a title that consists of text and a gif, or
>>> text and a sound. This is something to work on in the next spec
>>> version.
>>>
>>> Stefan
>>>
>>>
>>> Jason Novotny wrote:
>>>
>>>>
>>>> Hi all,
>>>>
>>>> I'm a little confused about the sequence of rendering according
>>>> to the JSR spec. Once again, i'm coming from the WebSphere
>>>> background where there is an extra portlet lifecycle method called
>>>> "doTitle" which can be overriden to provide any customized title.
>>>> It seems that the container during portlet rendering can start
>>>> creating a title bar, often a HTML table, then invoke the doTitle
>>>> method and then invoke the appropriate doXXX method. Now looking at
>>>> the JSR, it seems that one can set the title in the PortletResponse
>>>> during the doXXX method. As someone developing a portlet container
>>>> this seems a little tricky to me since I would somehow be required
>>>> to cache portlet content being generated in the doXXX and then pull
>>>> out the title from the response, render it and then continue
>>>> rendering the rest of the doXXX output.. does this make any sense?
>>>> What am I missing here?
>>>>
>>>> Thanks for your time, Jason
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
Re: confusion on rendering
Posted by Stefan Hepper <st...@hursley.ibm.com>.
That's life in a standardization group...
At some time when the opinions are too far apart you can only put in the
bare minimum that everyone feels comfortable with in order to make
further progress on other topics and get the spec out the door.
Stefan
Jason Novotny wrote:
>
> Well, thats really annoying. You mean as a container developer, I
> have to do more work AND I don't get the benefit of having doTitle as a
> lifecycle method that would allow me to display anything I want in the
> titlebar? ;-)
>
> Oh well, thanks for your response, Jason
>
> Stefan Hepper wrote:
>
>> Hi Jason,
>> no, you are correct, this is more complicated for the container and
>> requires buffering. That's the reason why the pluto portal sample
>> implementation ignores the title that you set it in the response. The
>> Expert Group viewed a new lifecycle method for setting the title as
>> overkill. Also there were a lot discussions about what a title really
>> is. Note that the current spec version only allows text titles, you
>> cannot have a title that consists of text and a gif, or text and a
>> sound. This is something to work on in the next spec version.
>>
>> Stefan
>>
>>
>> Jason Novotny wrote:
>>
>>>
>>> Hi all,
>>>
>>> I'm a little confused about the sequence of rendering according to
>>> the JSR spec. Once again, i'm coming from the WebSphere background
>>> where there is an extra portlet lifecycle method called "doTitle"
>>> which can be overriden to provide any customized title. It seems that
>>> the container during portlet rendering can start creating a title
>>> bar, often a HTML table, then invoke the doTitle method and then
>>> invoke the appropriate doXXX method. Now looking at the JSR, it seems
>>> that one can set the title in the PortletResponse during the doXXX
>>> method. As someone developing a portlet container this seems a little
>>> tricky to me since I would somehow be required to cache portlet
>>> content being generated in the doXXX and then pull out the title from
>>> the response, render it and then continue rendering the rest of the
>>> doXXX output.. does this make any sense? What am I missing here?
>>>
>>> Thanks for your time, Jason
>>>
>>>
>>
>>
>
>
>
Re: confusion on rendering
Posted by Jason Novotny <no...@aei.mpg.de>.
Well, thats really annoying. You mean as a container developer, I
have to do more work AND I don't get the benefit of having doTitle as a
lifecycle method that would allow me to display anything I want in the
titlebar? ;-)
Oh well, thanks for your response, Jason
Stefan Hepper wrote:
> Hi Jason,
> no, you are correct, this is more complicated for the container and
> requires buffering. That's the reason why the pluto portal sample
> implementation ignores the title that you set it in the response. The
> Expert Group viewed a new lifecycle method for setting the title as
> overkill. Also there were a lot discussions about what a title really
> is. Note that the current spec version only allows text titles, you
> cannot have a title that consists of text and a gif, or text and a
> sound. This is something to work on in the next spec version.
>
> Stefan
>
>
> Jason Novotny wrote:
>
>>
>> Hi all,
>>
>> I'm a little confused about the sequence of rendering according to
>> the JSR spec. Once again, i'm coming from the WebSphere background
>> where there is an extra portlet lifecycle method called "doTitle"
>> which can be overriden to provide any customized title. It seems that
>> the container during portlet rendering can start creating a title
>> bar, often a HTML table, then invoke the doTitle method and then
>> invoke the appropriate doXXX method. Now looking at the JSR, it seems
>> that one can set the title in the PortletResponse during the doXXX
>> method. As someone developing a portlet container this seems a little
>> tricky to me since I would somehow be required to cache portlet
>> content being generated in the doXXX and then pull out the title from
>> the response, render it and then continue rendering the rest of the
>> doXXX output.. does this make any sense? What am I missing here?
>>
>> Thanks for your time, Jason
>>
>>
>
>
Re: confusion on rendering
Posted by Stefan Hepper <st...@hursley.ibm.com>.
Hi Jason,
no, you are correct, this is more complicated for the container and
requires buffering. That's the reason why the pluto portal sample
implementation ignores the title that you set it in the response. The
Expert Group viewed a new lifecycle method for setting the title as
overkill. Also there were a lot discussions about what a title really
is. Note that the current spec version only allows text titles, you
cannot have a title that consists of text and a gif, or text and a
sound. This is something to work on in the next spec version.
Stefan
Jason Novotny wrote:
>
> Hi all,
>
> I'm a little confused about the sequence of rendering according to
> the JSR spec. Once again, i'm coming from the WebSphere background where
> there is an extra portlet lifecycle method called "doTitle" which can be
> overriden to provide any customized title. It seems that the container
> during portlet rendering can start creating a title bar, often a HTML
> table, then invoke the doTitle method and then invoke the appropriate
> doXXX method. Now looking at the JSR, it seems that one can set the
> title in the PortletResponse during the doXXX method. As someone
> developing a portlet container this seems a little tricky to me since I
> would somehow be required to cache portlet content being generated in
> the doXXX and then pull out the title from the response, render it and
> then continue rendering the rest of the doXXX output.. does this make
> any sense? What am I missing here?
>
> Thanks for your time, Jason
>
>