MATSUDA Masaaki wrote:
Hello,
I'm interested in this question.
Assuming you're using J1, you can simply share data between your portlets using the session.
Simply have your link invoke an action in Portlet 1, that will set a session or request parameter that is
expected by Portlet 2.
The idea of using session is the easiest way, I think too. But, there is a trouble.
For example : There are two portlets on the screen,
<snip>
Looks good. There is 2 news...
Of cource the upper portlet is setting session attribute of news count, and lower portlet is showing the session value.
But,... Is it normal to show the news count upper?! I changed the portlet layout, then trouble has occur!
<snip>
The news count is null :-P
Very sad...
I could understand there is executing sequence of portlet action. Normally, upper on the screen is first.
...Then, what can I do to solve this trouble?
This is created because you set your variable within your portlet buildNormalContext(). These methods are called during the rendering process following the entry order in PSML (which may be different from the visual layout order), thus you can't depend on any portlet being executed before another.
There are several ways to work around this depending on your exact requirements, for example : - use a Turbine action before you reach the page to set the correct value in the session. - share a "Turbine tool" between your portlets that will provide access to the same model
Hope this helps,
-- RaphaÃl Luta - [EMAIL PROTECTED] Apache Jetspeed - Enterprise Portal in Java http://portals.apache.org/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
