From portal-commits at lists.jboss.org Tue Jun 29 08:58:00 2010
Content-Type: multipart/mixed; boundary="===============5907154693480684941=="
MIME-Version: 1.0
From: portal-commits at lists.jboss.org
To: portal-commits at lists.jboss.org
Subject: [portal-commits] JBoss Portal SVN: r13947 -
docs/enterprise/trunk/Reference_Guide/en-US.
Date: Tue, 29 Jun 2010 08:58:00 -0400
Message-ID: <201006291258.o5TCw0rm027802@svn01.web.mwc.hst.phx2.redhat.com>
--===============5907154693480684941==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Author: thomas.heute(a)jboss.com
Date: 2010-06-29 08:58:00 -0400 (Tue, 29 Jun 2010)
New Revision: 13947
Modified:
docs/enterprise/trunk/Reference_Guide/en-US/Portal_API.xml
Log:
JBEPP-158: Remove note about future JSR-286 support from EPP 4.3 docs
Modified: docs/enterprise/trunk/Reference_Guide/en-US/Portal_API.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- docs/enterprise/trunk/Reference_Guide/en-US/Portal_API.xml 2010-06-28 0=
9:35:12 UTC (rev 13946)
+++ docs/enterprise/trunk/Reference_Guide/en-US/Portal_API.xml 2010-06-29 1=
2:58:00 UTC (rev 13947)
@@ -481,166 +481,6 @@
That's it - we now have a user counter that will display it=
states each time a user logs-in our logs-out.
- Achieving Inter Portlet Communication with the events mech=
anism
- The first version of the Portlet Specification (JSR 168), r=
egretfully, did not cover interaction between
- portlets. The side-effect of diverting the issue to the subsequen=
t release of the specification, has
- forced portal vendors to each craft their own proprietary API to =
achieve inter portlet communication. Here we will
- see how we can use the event mechanism to pass parameters from on=
e portlet to the other (and only to the other portlet).
- The overall scenario will be that Portlet B will need to be=
updated based on some parameter set on Portlet A.
- To achieve that we will use a portal node event.
- Portlet A is a simple Generic portlet that has a form that =
sends a color name:
- ");
- writer.println("");
- writer.println("");
- writer.println("");
- writer.close();
- }
-}
- ]]>
- =
- The other portlet (Portlet B) that will receive parameters =
from Portlet A is also a simple Generic portlet:
- some text in color");
- writer.close();
- }
- =
- // Inner listener explained after
-}
- ]]>
-
- With those two portlets in hands, we just want to pass para=
meters from Portlet A to Portlet B (the color in
- as a request parameter in our case). In order to achieve this goa=
l, we will write an inner Listener in Portlet B
- that will be triggered on any WindowActionEvent of Portlet A. Thi=
s listener will create a new WindowActionEvent
- on the window of Portlet B.
-
-
-
- It is important to note here some of the important items in th=
is listener class.
- Logic used to determine if the requesting node was Portlet A.:
- nodeName.equals("PortletAWindow")
-
-
- Get the current window object so we can dispatch the event to =
it:
- PortalNode windowB =3D node.resolve("../Portle=
tBWindow");
-
-
- Set the original parameter from Portlet A, so Portlet B can ac=
cess them in its processAction():
- newEvent.setParameters(wae.getParameters());=
programlisting>
-
-
-
- We still need to register our listener as an mbean:
-
-
-
- portal:service=3DListenerRegistry
- test_listener
-
- org.jboss.portal.core.samples.basic.event.PortletB$Listener
-
-]]>
- For node events, we also need to declare on which node we want=
to listen, this is done by modifying
- the *-object.xml that defines your portal n=
odes. In this example we want to trigger
- the listener each time the window containing the portlet A is =
actioned. We can add the listener
- tag to specify that out listener with RegistryId=3Dtest_listener should be triggered
- on events on the embedding object.
-
-
- PortletAWindow
- PortletAInstance
- center
- 0
- test_listener
-
-...]]>
-
- Of course we could have added it at the page level instead of =
the window level. Note that a unique listener
- can be specified, the event mechanism is primarily done to let=
the developer change the navigation state of the
- portal, this example being a nice side-effect of this feature.
-
- The portlet 2.0 specification (JSR 286) will cover In=
ter Portlet Communication so that portlets using it
- can work with different portal vendors.
-
- Link to other pagesLinking to some other pages or portals is also out of the s=
cope of the portlet
specification. As seen previously JBoss Portal offers an API in o=
rder to create links
--===============5907154693480684941==--