JBoss Community Archive (Read Only)

Portlet Bridge 3.3

DeltaSpike Example

Using DeltaSpike within your CDI/JSF portlet is a very straightforward process. The most important thing to note about using DeltaSpike in a portlet, is to disable the client window render mode by setting ClientWindowRenderMode.NONE.

To see DeltaSpike in action in a portlet, first we need to get the JSF/CDI example application for DeltaSpike from https://github.com/apache/deltaspike/tree/master/deltaspike/examples/jsf-examples.

We then need to add the following Maven dependencies to the project:

<dependency>
    <groupId>org.jboss.portletbridge</groupId>
    <artifactId>jsf2-depchain</artifactId>
    <version>3.2.0.Final</version>
    <type>pom</type>
</dependency>
<dependency>
    <groupId>org.gatein</groupId>
    <artifactId>cdi-portlet-integration</artifactId>
    <version>1.0.1.Final</version>
</dependency>

Modify SampleClientWindowConfig to return ClientWindowRenderMode.NONE instead of ClientWindowRenderMode.CLIENTWINDOW.

Finally add the portlet.xml from https://github.com/portletbridge/portletbridge/tree/master/examples/deltaspike-portlet to make it accessible as a portlet.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:28:53 UTC, last content change 2013-06-12 20:33:18 UTC.