[
https://issues.apache.org/jira/browse/PB-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462763
]
Ate Douma commented on PB-49:
-----------------------------
James,
After further reviewing your patch, Im curious why you also add the EntityId
(actually the much longer EntityKey) to request attributes and render
parameters?
Request attributes are already only scoped to the current Portlet(Window), so I
don't see why that should be nessacery.
And render parameters by itself already have the current window id encoded
(hidden), so those too already target only the current PortletWindow.
Which leaves session attributes, for which your solution is fine, although I
think I prefer to use just the EntityId (which I will call WindowId) as its
much shorter than the generated EntityKey.
If I remove the adding of the entityId to the request and render parameters the
number of required changes will also be much smaller :)
Please let me know if I misunderstood the intended purpose of this though.
I'll have to review the patch a little further, but so far it looks great.
As far as I can see, the Form lookup handling as well as storing the
RenderContextAttributes in the PortletSession are good solutions to the problem.
The PortletActionMapping I also need to review further, and I probably will
take it out of the resolution of this issue and create a new feature issue for
it and commit it separately.
The definition of the static PortletContext getStrutsPortletContext() method on
StrutsPortlet I think is wrong by the way.
Different StrutsPortlets (not instances) will have a different PortletContext,
so a static reference to one of them can't be right.
If you do need something like this (and don't use different StrutsPortlets) I
suggest adding a similar method to an extended StrutsPortlet base class of your
own.
Finally, a PortletMode should never be stored directly in a session as it is
not serializable.
That will cause problems with clustered enviroments, so I will use the String
representation of a PortletMode.
> Multiple instances of a struts portlet should be able to coexist on a single
> page.
> ----------------------------------------------------------------------------------
>
> Key: PB-49
> URL: https://issues.apache.org/jira/browse/PB-49
> Project: Portals Bridges
> Issue Type: Bug
> Components: struts
> Affects Versions: 1.0
> Environment: Any.
> Reporter: James May
> Assigned To: Ate Douma
> Attachments: patch-2007-01-04.zip, patch.zip
>
>
> When including multiple instances of a struts portlet on a page, form data
> for the portlet instances gets clobbered because there is a single form bean
> that is shared by all instances. Each portlet instance should be able to
> maintain its state independently of other instances.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]