From: mholzner <nu...@jb...> - 2005-06-14 14:13:16
|
All I can think of is shared state in the HTTPSession. Portlet A sets the state into the session during an action request , portlet B picks up that state from the session during the render cycle. by setting the state in the action request you can insure that the state will be changed by the time portlet B comes around to read it .... Note that the HttpSession is only shared between portlets in the same WAR. If you need to share state between portlets across WARs you'll needs to find another way (like a db or some other centrally available store) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881417#3881417 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881417 |
From: legolas <nu...@jb...> - 2005-06-14 14:20:19
|
Hi, The standard provides you with a 'portlet global'session. If your store or retrieve something to/from the session, you can use something like: portletSession.setAttribute("myKey", "myValue"); This is the default, and prefered way, because it stores your key/value on the portlet session using portlet scope and hides it for other portlets. But you can also set it using: portletSession.setAttribute("myKey", "myValue", PortletSession.APPLICATION_SCOPE); Which sets the attribute using application scope. Now you can retrieve the value from a different portlet using: portletSession.getAttribute("myKey", PortletSession.APPLICATION_SCOPE); Hope this helps... Marcel View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881418#3881418 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881418 |
From: zeroconf <nu...@jb...> - 2005-06-14 17:49:36
|
Thanks, I'll try the portletSession solution View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881455#3881455 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881455 |
From: echoi1975 <nu...@jb...> - 2005-06-14 19:48:17
|
i concur, i had to use a workaround as well, and used the APPLICATION_SCOPE session object to share objects across portlets in the same portal app View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881472#3881472 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881472 |
From: zeroconf <nu...@jb...> - 2005-06-18 08:08:20
|
Am I right that the "portletSession" solution only works for portlets belonging to the same web application? So for example if two developers develop their portlets (each in it's own application) is there any common work arround for getting both portlets to exchange information with each other? I'm sorry to admit, that I wasn't able to get portlets running in JBoss Portal as expected (the portlet deployment didn't work for me) - so I tried it on the exoplatform portal framework which is also JSR-168 complient. I followed the referenceGuide docs ("Chapter 2. XML descriptors") and my new portlets showed up in the "page menu portlet", but when I clicked on the link I just got an empty page. Are there any further step-by-step Howtos/Docs on how to deploy portlets? Thanks View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882002#3882002 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882002 |
From: legolas <nu...@jb...> - 2005-06-20 08:13:20
|
It is not necessarily restricted to portlets in the same app, but The spec (PLT.15.3) describes it as anonymous wrote : Any object stored in the session using the APPLICATION_SCOPE is available to any other portlet that belongs to the same portlet application and that handles a request identified as being a part of the same session. This means that anything stored on the session with APPLICATION_SCOPE must be visible to other portlets in the same application, but can be visible to other portlets outside the same application, depending on the container implementation. Hope this helps... Marcel View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882067#3882067 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882067 |