I've had someproblems with this. While running my single JSF portlet in Liferay 3.6.1 it seems that every session scoped backing bean gets its own portlet scoped session map!?! OR said differently (I tend to confuse myself), If I put something in the session map in one backing bean I am unable to see it in a different backing bean. The only way around it for me is to get the PortletRequest explicitly, get the Portlet sessison map and put things in the "application scope" of the session.
So I've got portlet API imports in my backing bean. It's sort of ugly. And I've even got one place where I redirect from the JSF portlet out to the webapp. My portlet application war is also deployed as a webapp in the portal ear with its own context assigned. This way I can do other things easily (like popup some data in a small window without all kinds of portal hoops and loops). Unfortunately session visibility really goes out of the window. Not to mention JSF server side state saving. I wish the servlet/EE spec included a "shared HttpSession in same ear" feature. Weblogic 9 apparently has this. -H On 11/3/05, Dan Robinson <[EMAIL PROTECTED]> wrote: > Am I correct in saying that this causes an issue when writing an application > that runs both standalone and in a portal? > > For example, if I have more than one portlet in my application which share > data through the session, then I have to mark such managed-beans as > application scope in JSF. However, if I use such a managed-bean in the > stand-alone version, then all users would have access to the same data - > yes? > > Or am I actually looking at a 0.00001% chance use-case? I guess there's no > problem if the application only uses one portlet. > > Thanks, > > D. > > > > On 10/27/05, Stan Silvert <[EMAIL PROTECTED]> wrote: > > Yes, this is required by the spec. See the javadoc for > > ExternalContext.getSessionMap(). > > > > Stan Silvert > > JBoss, Inc. > > [EMAIL PROTECTED] > > callto://stansilvert > > > -----Original Message----- > > > From: Henrik Bentel [mailto: [EMAIL PROTECTED] > > > Sent: Wednesday, October 26, 2005 6:28 PM > > > To: [email protected] > > > Subject: JSF/Myfaces and PorletSession PORTLET_SCOPE > > > > > > Hi > > > > > > After having some object scope issues with my JSF porlet on Liferay I > > > snooped around > > > > org/apache/myfaces/context/portlet/PortletExternalContextImpl.java > > > and org/apache/myfaces/context/portlet/SessionMap.java > > > > > > I notices that the SessionMap implementation only uses the portlet > > > scope (PortletSession.PORTLET_SCOPE) when putting or retrieving > > > objects from the PortletSession. > > > It never uses the application scope( > PortletSession.APPLICATION_SCOPE), > > > which is usefull for portlet to portlet communication. > > > > > > I'm just curious if this is required by the JSF specification or just > > > the obvious choice. > > > > > > thx, > > > Henriki > > > >

