Hey Moritz,

have a look at "PortletSessionImpl.class".

try to replace 

session.setAttribute(name, value);

by

session.setAttribute(name, value, PortletSession.APPLICATION_SCOPE);

Do the same for all methods (like getAttribute, getAttributeNames), where a 
scope can be defined:

http://www.bluesunrise.com/portlet-api/javax/portlet/PortletSession.html

>             
> -------- Original-Nachricht --------
> Datum: Tue, 19 Apr 2011 23:07:09 +0200
> Von: Moritz Gmelin <moritz.gme...@gmx.de>
> An: "Tapestry users" <users@tapestry.apache.org>
> Betreff: Re: Multiple Portlets / Sharing SSOs
> 
>             Answering my own posts and asking new questions that I can 
> maybe answer tomorrow might have some therapeutic effects...
> 
> I've come further in my Portlets Quest by putting my 2 portlets in a 
> single contexts. That was my original goal. Better than having a single 
> context for each portlet.
> 
> But now I still have the problem that @SessionStateObjects are not shared 
> between the portlets.
> 
> I can see that a RequestGlobals Object that I can inject into my page 
> (the page that will render the portlet) don't know about an 
> HTTPServletRequest (getHTTPServletRequest() on an injected RequestGlobals 
> object returns null).
> So this might be confusing for the ApplicationStateManager. 
> Is there a way to make an ApplicationStateManager bind its SSOs to the 
> PortletSession that the page definitely knows of?
> 
> Thanks
> 
> Moritz 
> 
> 
> Am 18.04.2011 um 21:51 schrieb Moritz Gmelin:
> 
> > OK,
> > 
> > step 1 solved. I needed to put the tapestryportlet relevant stuff in 
> the context WEB-INF/lib and leave the pure tapestry stuff in the Jetty 
> lib/ext directory. Now I can have multiple portlets in different contexts 
> of my liferay-jetty and display those portlets on my page. Great! (Using 
> tapestry 5.2.5).
> > 
> > My next wish would be to share SessionStateObject between the two 
> portlets (contextes). Can somebody point me into the right direction 
> here?
> > 
> > What I can see in both portlets is that I can inject 
> PortletRequestGlobals into both portlets and 
> getPortletRequest().getRequestedSessionId() on this object gives the same 
> ID for both portlets.  
> > 
> > Thanks for any clues.
> > 
> > Moritz
> > 
> > Am 18.04.2011 um 10:47 schrieb Moritz Gmelin:
> > 
> >> Hi,
> >> 
> >> I have tried using Markus Feindlers code to create some portlets for a 
> liferay portal server. It started very promissing but now I am quite 
> stuck with some tapestry issues.
> >> 
> >> In order for those portlets to get initialized in liferay I needed to 
> place all tapestry jars in the lib folder of the Jetty server that is 
> running liferay (the same applies when using tomcat). 
> >> Two portlets that I have created for testing work quite fine this way 
> as long as they do not appear at the same time in the webapps directory 
> of jetty. 
> >> If I added both portlets with different tapestry.app-package names 
> defined in its web.xml at the same time, things go wrong. The rendering 
> is not going through the right RequestHandler. The Rendering of the 
> second portlet is still piped through RequestHandlers from the first 
> portlet. And since it is trying to render a page that is defined in the 
> context of the second portlet, it fails.
> >> Is this happening because the tapestry-libs are handled by the parent 
> classloader and not by the context classloader?
> >> Can anyone imagine why I can't have the tapestry libraries in the 
> portlet's WEB-INF lib directory?
> >> Are there any plans to add the JSR-286 support directly in Tapestry 
> 5.3?
> >> 
> >> Regards
> >> 
> >> Moritz
> >> 
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >> 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
        
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl

Reply via email to