You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Stefan Hepper <st...@hursley.ibm.com> on 2003/11/10 22:08:57 UTC
Re: Spec question: portlet window id?
Hi Glenn,
no we explicitly avoided to define portlet window and portlet entities
for the first spec version as there were many different ideas on this
and the consensus was to first take a look at different implementations
of the spec before deciding anything on this matter, as it goes into the
direction of aggreagation.
You can share attributes with servlets by using the application scope.
Then no prefixing is done.
I think what you are looking for is a grouping mechanism. That was also
discussed but delayed for a future spec version as it was considerate a
special case of the app scope that you can do by hand.
Stefan
Glenn R. Golden wrote:
> The spec mentions that each portlet window gets a unique id from the
> portal, used to form the portlet scoped session attributes:
>
> javax.portlet.p.<ID>?<attribute name>
>
> I'm looking for how the portlet can find out this <ID> value for the
> current request being processed. Is there a standard way?
>
> The spec talks about servlets being able to share attributes with the
> portlet... but without this ID a servlet will have a hard time finding
> the attributes... of course, I'm not sure how the servlet will find it
> even if the portlet can know.
>
> I guess the portlet could use the application scope, so the name it uses
> for an attribute can be shared with the Servlet, but then we have to
> re-invent the portlet-window concept to keep attributes from one
> portlet-window separate from another.
>
> Ideas?
>
> Thanks.
>
> - Glenn
>
>
Re: Spec question: portlet window id?
Posted by Stefan Hepper <st...@hursley.ibm.com>.
You're right and I think this will change for the next spec version.
Actually the ID was introduce very late in the spec with the only reason
to re-use the servlet session listners (before we had duplicated them in
order to aviod defining this ID).
Stefan
Glenn R. Golden wrote:
> What I'm looking for is the ability for a servlet and a specific portlet
> window instance to communicate. The spec goes 99% of the way to make
> this possible - it dictates exactly how the portlet scoped attribute
> name gets constructed, calling for that <ID> in the middle. It just
> doesn't have a way for the portlet to get the ID. Well, not a direct
> way...
>
> But the spec also leverages the full Servlet spec, which has session
> attribute listeners, which are called when they are placed into the
> session, and are told as part of the call what the attribute name is.
> It's a simple matter to place a special object into the portlet's
> session in portlet scope, and have that object tell the portlet exactly
> what it's ID is.
>
> All 100% standard, just not 100% direct.
>
> Since the spec gets so close, I'd consider this a hole in the spec. Not
> providing a method to get that portlet - window ID doesn't really
> acomplish anything.
>
> But it's easily dealt with.
>
> - Glenn
>
> On Monday, November 10, 2003, at 04:08 PM, Stefan Hepper wrote:
>
>> Hi Glenn,
>> no we explicitly avoided to define portlet window and portlet entities
>> for the first spec version as there were many different ideas on this
>> and the consensus was to first take a look at different
>> implementations of the spec before deciding anything on this matter,
>> as it goes into the direction of aggreagation.
>>
>> You can share attributes with servlets by using the application scope.
>> Then no prefixing is done.
>>
>> I think what you are looking for is a grouping mechanism. That was
>> also discussed but delayed for a future spec version as it was
>> considerate a special case of the app scope that you can do by hand.
>>
>> Stefan
>>
>>
>> Glenn R. Golden wrote:
>>
>>> The spec mentions that each portlet window gets a unique id from the
>>> portal, used to form the portlet scoped session attributes:
>>> javax.portlet.p.<ID>?<attribute name>
>>> I'm looking for how the portlet can find out this <ID> value for the
>>> current request being processed. Is there a standard way?
>>> The spec talks about servlets being able to share attributes with the
>>> portlet... but without this ID a servlet will have a hard time
>>> finding the attributes... of course, I'm not sure how the servlet
>>> will find it even if the portlet can know.
>>> I guess the portlet could use the application scope, so the name it
>>> uses for an attribute can be shared with the Servlet, but then we
>>> have to re-invent the portlet-window concept to keep attributes from
>>> one portlet-window separate from another.
>>> Ideas?
>>> Thanks.
>>> - Glenn
>
>
>
Re: Spec question: portlet window id?
Posted by "Glenn R. Golden" <gg...@umich.edu>.
What I'm looking for is the ability for a servlet and a specific
portlet window instance to communicate. The spec goes 99% of the way
to make this possible - it dictates exactly how the portlet scoped
attribute name gets constructed, calling for that <ID> in the middle.
It just doesn't have a way for the portlet to get the ID. Well, not a
direct way...
But the spec also leverages the full Servlet spec, which has session
attribute listeners, which are called when they are placed into the
session, and are told as part of the call what the attribute name is.
It's a simple matter to place a special object into the portlet's
session in portlet scope, and have that object tell the portlet exactly
what it's ID is.
All 100% standard, just not 100% direct.
Since the spec gets so close, I'd consider this a hole in the spec.
Not providing a method to get that portlet - window ID doesn't really
acomplish anything.
But it's easily dealt with.
- Glenn
On Monday, November 10, 2003, at 04:08 PM, Stefan Hepper wrote:
> Hi Glenn,
> no we explicitly avoided to define portlet window and portlet entities
> for the first spec version as there were many different ideas on this
> and the consensus was to first take a look at different
> implementations of the spec before deciding anything on this matter,
> as it goes into the direction of aggreagation.
>
> You can share attributes with servlets by using the application scope.
> Then no prefixing is done.
>
> I think what you are looking for is a grouping mechanism. That was
> also discussed but delayed for a future spec version as it was
> considerate a special case of the app scope that you can do by hand.
>
> Stefan
>
>
> Glenn R. Golden wrote:
>
>> The spec mentions that each portlet window gets a unique id from the
>> portal, used to form the portlet scoped session attributes:
>> javax.portlet.p.<ID>?<attribute name>
>> I'm looking for how the portlet can find out this <ID> value for the
>> current request being processed. Is there a standard way?
>> The spec talks about servlets being able to share attributes with the
>> portlet... but without this ID a servlet will have a hard time
>> finding the attributes... of course, I'm not sure how the servlet
>> will find it even if the portlet can know.
>> I guess the portlet could use the application scope, so the name it
>> uses for an attribute can be shared with the Servlet, but then we
>> have to re-invent the portlet-window concept to keep attributes from
>> one portlet-window separate from another.
>> Ideas?
>> Thanks.
>> - Glenn