Integration of CDI into portlets

Parent POM for JBoss projects. Provides default project build configuration.

Лицензия

Лицензия

Группа

Группа

org.gatein
Идентификатор

Идентификатор

cdi-portlet-integration
Последняя версия

Последняя версия

1.0.3.Final
Дата

Дата

Тип

Тип

jar
Описание

Описание

Integration of CDI into portlets
Parent POM for JBoss projects. Provides default project build configuration.
Организация-разработчик

Организация-разработчик

JBoss by Red Hat
Система контроля версий

Система контроля версий

https://github.com/portletbridge/cdi-portlet-integration

Скачать cdi-portlet-integration

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.gatein/cdi-portlet-integration/ -->
<dependency>
    <groupId>org.gatein</groupId>
    <artifactId>cdi-portlet-integration</artifactId>
    <version>1.0.3.Final</version>
</dependency>
// https://jarcasting.com/artifacts/org.gatein/cdi-portlet-integration/
implementation 'org.gatein:cdi-portlet-integration:1.0.3.Final'
// https://jarcasting.com/artifacts/org.gatein/cdi-portlet-integration/
implementation ("org.gatein:cdi-portlet-integration:1.0.3.Final")
'org.gatein:cdi-portlet-integration:jar:1.0.3.Final'
<dependency org="org.gatein" name="cdi-portlet-integration" rev="1.0.3.Final">
  <artifact name="cdi-portlet-integration" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.gatein', module='cdi-portlet-integration', version='1.0.3.Final')
)
libraryDependencies += "org.gatein" % "cdi-portlet-integration" % "1.0.3.Final"
[org.gatein/cdi-portlet-integration "1.0.3.Final"]

Зависимости

provided (2)

Идентификатор библиотеки Тип Версия
javax.portlet : portlet-api jar 2.0
javax.servlet : javax.servlet-api jar 3.0.1

Модули Проекта

Данный проект не имеет модулей.

CDI Portlet Integration

What is this?

This library contains one Portlet Filter that wraps Portlet Request objects with HttpServletRequest so that CDI will work within a JSF portlet that uses a JSF Bridge. It also contains a second filter that wraps both Portlet Request and Response objects, for when you need CDI to operate on the request and response objects.

Configuration

To enable this integration for your JSF portlet, simply add the following filter definition into your portlet.xml:

<filter>
    <filter-name>PortletCDIFilter</filter-name>
    <filter-class>org.gatein.cdi.PortletCDIFilter</filter-class>
    <lifecycle>ACTION_PHASE</lifecycle>
    <lifecycle>EVENT_PHASE</lifecycle>
    <lifecycle>RENDER_PHASE</lifecycle>
    <lifecycle>RESOURCE_PHASE</lifecycle>
</filter>
<filter-mapping>
    <filter-name>PortletCDIFilter</filter-name>
    <portlet-name>[Name of your portlet as defined in portlet-name]</portlet-name>
</filter-mapping>

The above example uses the filter that wraps Portlet Request objects only. If you want to use the filter that wraps Portlet response objects as well, change the filter-class tag content to org.gatein.cdi.PortletCDIResponseFilter.

What is supported

The following CDI Scopes are currently supported within a JSF portlet using this library:

  • @ApplicationScoped
  • @SessionScoped
  • @ConversationScoped for long running conversations

@ConversationScoped (transient conversations)

Transient conversations are not supported within a JSF portlet as they are initialized at the commencement of the ActionRequest and RenderRequest, so any beans that had data saved during ActionRequest will be reset when RenderRequest commences.

@RequestScoped

@RequestScoped is not supported within a JSF portlet as the concept of a ServletRequest (for JSF) and a PortletRequest have very different lifecycles. This results in any @RequestScoped beans being initialized at the commencement of any PortletRequest, with no way to retain data between them.

org.gatein

Portlet Bridge

Версии библиотеки

Версия
1.0.3.Final
1.0.2.Final
1.0.1.Final
1.0.0.Final
1.0.0.Alpha2
1.0.0.Alpha1