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.


> I realize that HelloVelocity is probably a simple example and probably is
> intended as a naive implementation, but it raises a question.
> 
> Is it possible in the Jetspeed architecture to implement a Portlet such that
> if more than 1 of the same Portlet type are placed on the same pane, they
> naturally act independently of each other?
> 
> I also noticed that the first time I changed the text in the Portlet, it
> updated the psml file with the new text (by adding a parameter entry for the
> "text" parameter).  From then on, any new text entered never made it to the
> psml file.  In fact, on subsequent submissions of new text, the psml file
> WAS updated, however, the "text" parameter was set to the first value that I
> had entered (not the latest value).
> 


I can't reproduce this behavior, can you give me some more information on
your setup ?

--
Raphael Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Paris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to