You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Rimas Remeza <ri...@yahoo.com> on 2001/12/20 18:32:19 UTC

Multiple portlets of the same type

Just checking... Has this issue been addressed, i.e.,
multiple portlets of the same type in the same psml
file is now supported, or is this still on the to do
list?

Thank you!

--------------------------------------------------------------------------------

From: Rapha�l Luta 
Subject: Re: Multiple portlets of the same type 
Date: Thu, 14 Jun 2001 09:58:10 -0700 

--------------------------------------------------------------------------------

Chuck Johnson wrote:

> Hello all,
> 
> I am in the process of learning the latest Jetspeed
and I have a question
> about placing multiple portlets on the same pane.
> 


Ouch... :(


> I was looking at the "HelloVelocity" Portlet example
and trying to
> understand how the actions worked and it struck me
as odd that the target
> URL for the form it generates appeared to submit to
the overall "portal"
> target (instead of to a specific Portlet).  In
addition, the action
> specified in the form was not specific to a given
Portlet instance.
> 
> As a test, I placed 2 instances of the HelloVelocity
Portlet on the same
> pane.  I see what I would consider "odd" behavior.
> 
> First, when I submit a change to the text, both
portlets are updated with
> the text on the screen.
> 
> Second, when I minimize one of the Portlet
instances, both instances
> minimize.
> 


This issue is twofold:
- the first issue is Portlet-Action interaction:
   Currently Jetspeed does not implement at the
'engine' level a portlet
   parameter recognition that allows to uniformly
identify the requested
   portlet. Each code that wishes to identify a
portlet uses a parameter
   convention on its own (usually 'portlet').

   This is easy to change (and is on my small tasks
list): now that Jetspeed
   has its own RunData interface, I'll add a new
method to the JetspeedRunData


   public String getPortlet()
   public void setPortlet(String portletName)

   and update the sesion validator to detect if any
portlet is required by
   the portlet parameter and put it into the RunData.
   This will provide uniform requested portlet info
for all the Jetspeed code
   (customizer, portlet, control, etc...) so that we
won't need to bother
   about parameter parsing and will allow the
JetspeedLink utility class to
   automatically create portlet-specific URL to
include in forms.


- the second issue is much trickier:

   historically the PortletFactory assigned to the
Portlet the name of its
   parent registry entry (and in fact did not keep a
'Parent' reference field),
   thus whenever you use portlet.getName() you
actually retrieve the parent
   name.
   This means that if you include 2 portlets with the
same parent in a PSML
   page you get some weird behaviors because the
system thinks they have the
   same name.
   I've already prepared the work to fix this since
I've added a new PSML field
   in entry for storing the local portlet name but
I've not yet modified the
   PortletFactory and PortalToolkit to take advantage
of this. Why ?

   Because, throughout Jetspeed there are some
portlet.getName() calls which some
   times mean <get local instance portlet name> but
some times <get portlet
   parent registry name>, thus activating this feature
would require to audit all
   the portlet.getName() calls and determine whether
they belong to the first or
   second category.

   I don't have currently the time to do this on my
own, so unless someone is
   willing to give an hand on the issue, it'll wait
and I'll put in the
   release notes of 1.3a2 that it does not allow
multiple instances of a
   specific portlet registry entry within the same
PSML file.




__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Multiple portlets of the same type

Posted by Paul Spencer <pa...@apache.org>.
Rimas,
Their is a known problem when the same portlet exist more then once in a 
PSML. As long as the portlets have different names you should be fine.

Paul Spencer

Rimas Remeza wrote:

> Just checking... Has this issue been addressed, i.e.,
> multiple portlets of the same type in the same psml
> file is now supported, or is this still on the to do
> list?
> 
> Thank you!
> 
> --------------------------------------------------------------------------------
> 
> From: Raphaël Luta 
> Subject: Re: Multiple portlets of the same type 
> Date: Thu, 14 Jun 2001 09:58:10 -0700 
> 
> --------------------------------------------------------------------------------
> 
> Chuck Johnson wrote:
> 
> 
>>Hello all,
>>
>>I am in the process of learning the latest Jetspeed
>>
> and I have a question
> 
>>about placing multiple portlets on the same pane.
>>
>>
> 
> 
> Ouch... :(
> 
> 
> 
>>I was looking at the "HelloVelocity" Portlet example
>>
> and trying to
> 
>>understand how the actions worked and it struck me
>>
> as odd that the target
> 
>>URL for the form it generates appeared to submit to
>>
> the overall "portal"
> 
>>target (instead of to a specific Portlet).  In
>>
> addition, the action
> 
>>specified in the form was not specific to a given
>>
> Portlet instance.
> 
>>As a test, I placed 2 instances of the HelloVelocity
>>
> Portlet on the same
> 
>>pane.  I see what I would consider "odd" behavior.
>>
>>First, when I submit a change to the text, both
>>
> portlets are updated with
> 
>>the text on the screen.
>>
>>Second, when I minimize one of the Portlet
>>
> instances, both instances
> 
>>minimize.
>>
>>
> 
> 
> This issue is twofold:
> - the first issue is Portlet-Action interaction:
>    Currently Jetspeed does not implement at the
> 'engine' level a portlet
>    parameter recognition that allows to uniformly
> identify the requested
>    portlet. Each code that wishes to identify a
> portlet uses a parameter
>    convention on its own (usually 'portlet').
> 
>    This is easy to change (and is on my small tasks
> list): now that Jetspeed
>    has its own RunData interface, I'll add a new
> method to the JetspeedRunData
> 
> 
>    public String getPortlet()
>    public void setPortlet(String portletName)
> 
>    and update the sesion validator to detect if any
> portlet is required by
>    the portlet parameter and put it into the RunData.
>    This will provide uniform requested portlet info
> for all the Jetspeed code
>    (customizer, portlet, control, etc...) so that we
> won't need to bother
>    about parameter parsing and will allow the
> JetspeedLink utility class to
>    automatically create portlet-specific URL to
> include in forms.
> 
> 
> - the second issue is much trickier:
> 
>    historically the PortletFactory assigned to the
> Portlet the name of its
>    parent registry entry (and in fact did not keep a
> 'Parent' reference field),
>    thus whenever you use portlet.getName() you
> actually retrieve the parent
>    name.
>    This means that if you include 2 portlets with the
> same parent in a PSML
>    page you get some weird behaviors because the
> system thinks they have the
>    same name.
>    I've already prepared the work to fix this since
> I've added a new PSML field
>    in entry for storing the local portlet name but
> I've not yet modified the
>    PortletFactory and PortalToolkit to take advantage
> of this. Why ?
> 
>    Because, throughout Jetspeed there are some
> portlet.getName() calls which some
>    times mean <get local instance portlet name> but
> some times <get portlet
>    parent registry name>, thus activating this feature
> would require to audit all
>    the portlet.getName() calls and determine whether
> they belong to the first or
>    second category.
> 
>    I don't have currently the time to do this on my
> own, so unless someone is
>    willing to give an hand on the issue, it'll wait
> and I'll put in the
>    release notes of 1.3a2 that it does not allow
> multiple instances of a
>    specific portlet registry entry within the same
> PSML file.
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>