myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Dalla Bernardina <>
Subject Re: Portlet support - multiple instances of a portlet.
Date Sat, 04 Mar 2006 14:06:41 GMT
 From JSR 168.
"PLT.15.2 Session Scope
PortletSession objects must be scoped at the portlet application context 
Each portlet application has its own distinct PortletSession object per 
user session. The portlet container must not share the PortletSession 
object or the attributes stored in it among different portlet 
applications or among different user sessions."

MyFacesGenericPortlet implementation uses PortletSession object to save 
ManagedBeans with session scope. The JSR 168 don't say that 
PortletSession is scoped per user and portlet-instance. Only per user 
and portlet application.

This is not good. I think these is a problem of the specification.

On the other side, I use the same portlet application (portlet.xml) to 
handle diferent portlet-instances in the same page with JBossPortal and 
the problem everything works great. I think jboss portal fail to follow 
the specification in this item. Maybe intentionaly.

Or maybe I misinterpreted the specification.

Marcio E Miranda wrote:

> Hi,
> How does MyFaces (or JSF for that matter) handle backing beans in 
> multiple instances of the same portlet? For example, let’s say that 
> I’ve deployed two instances of MyPortlet in the same page of a portal. 
> MyPortlet defines a view which has components binded to a backing bean 
> that must be saved for each portlet instance, because it holds 
> information specific to that portlet instance (in portlet API terms, 
> it should be stored in the Portlet session with portlet scope).
> Does JSF handle portlet scope in the managed bean creation facility 
> (and in EL)? If not, how would I handle that in JSF? How should I 
> create the backing bean and how should I reference it using EL?
> Thanks,
> Marcio.

View raw message