JBoss.orgCommunity Documentation
Portlet 2.0 coordination features are mediated by the portal between several portlet windows, therefore the portal at runtime needs to be able to define relationships between windows. Relationship can be established from an implicit model (i.e a set of predicates applied on some state that will answer TRUE/FALSE to the question are the portlet windows foo and bar in a relationship) or from an explicit model (that states that foo and bar have a relationship). The implicit model is very good for defining default configuration as it does not require much configuration but is not able to cover the exceptional case, that's why we need to combine it with an explicit model that will take precedence over the implicit model, it is the well known principle of convention over configuration.
Currently all explicit coordination happens only in the scope of the same page.
Wires JSR-286 events. With implicit wirings the event producer and the consumer declares the same event namespace and local name to get event delivered in the scope of the same page. With explicit wiring any pairs of Window:Event can be connected.
Binds JSR-286 shared parameters. With implicit binding parameters with the same public name are shared. With explicit binding any public parameters can share values. Windows for which such binding applies are explicitly defined.
Configuration takes place in -object.xml file. The <coordination> tag can be used in both <page> and <portal> tags. When used in <portal> tag only <implicit-mode> tag can be defined for wirings and bindings:
<portal>
...
<coordination>
<bindings>
<implicit-mode>TRUE</implicit-mode>
</bindings>
<wirings>
<implicit-mode>FALSE</implicit-mode>
</wirings>
</coordination>
</portal>
When used within the <page> tag coordination event wirings and bindings can be defined:</page>
<coordination>
<wirings>
<implicit-mode>TRUE</implicit-mode>
<event-wiring>
<name>eventWiring1</name>
<sources>
<window-coordination>
<window-name>ShoppingCatalogPortletWindow1</window-name>
<qname>{urn:jboss:portal:samples:event}CartEvent</qname>
</window-coordination>
</sources>
<destinations>
<window-coordination>
<window-name>ShoppingCartPortletWindow2</window-name>
<qname>{urn:jboss:portal:samples:event}CartEvent</qname>
</window-coordination>
<window-coordination>
<window-name>ShoppingCartPortletWindow3</window-name>
<qname>{urn:jboss:portal:samples:event}CartEvent</qname>
</window-coordination>
</destinations>
</event-wiring>
<event-wiring>
<name>eventWiring2</name>
<sources>
<window-coordination>
<window-name>ShoppingCatalogPortletWindow2</window-name>
<qname>{urn:jboss:portal:samples:event}CartEvent</qname>
</window-coordination>
</sources>
<destinations>
<window-coordination>
<window-name>ShoppingCartPortletWindow1</window-name>
<qname>{urn:jboss:portal:samples:event}CartEvent</qname>
</window-coordination>
<window-coordination>
<window-name>ShoppingCartPortletWindow4</window-name>
<qname>{urn:jboss:portal:samples:event}CartEvent</qname>
</window-coordination>
</destinations>
</event-wiring>
</wirings>
<bindings>
<implicit-mode>FALSE</implicit-mode>
<parameter-binding>
<id>parameterBinding1</id>
<window-coordination>
<window-name>SomePortletWindow1</window-name>
<qname>foo</qname>
</window-coordination>
<window-coordination>
<window-name>SomePortletWindow2</window-name>
<qname>foo</qname>
</window-coordination>
<window-coordination>
<window-name>SomePortletWindow3</window-name>
<qname>foo</qname>
</window-coordination>
</parameter-binding>
<parameter-binding>
<id>parameterBinding2</id>
<window-coordination>
<window-name>SomePortletWindow1</window-name>
<qname>bar1</qname>
</window-coordination>
<window-coordination>
<window-name>SomePortletWindow2</window-name>
<qname>{urn:jboss:portal:samples:daa1}daa1</qname>
</window-coordination>
</parameter-binding>
<alias-binding>
<id>aliasBinding1</id>
<qname>foo</qname>
</alias-binding>
<alias-binding>
<id>aliasBinding2</id>
<qname>bar1</qname>
<qname>{urn:jboss:portal:samples:daa2}daa2</qname>
</alias-binding>
</bindings>
</coordination>
This tag can be applied for both <bindings> and <wirings> tags. It defines if implicit coordination is enabled or disabled for this given portal object. Value of this setting is cascaded to all children in portal object tree unless overwritten somewhere in the hierarchy. If no <implicit-mode> is defined in portal object tree default value is TRUE.