### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.5.2. < a4j:portlet > available since 3.0.0

expand all

#### 6.5.2.1. Description

The <a4j:portlet> component is DEPRECATED as far as JSR-301 was defined a same functionality for a UIViewRoot component. Thus, it is implicitly defined by mandatory <f:view> component.

Table 6.49. a4j : portlet attributes

Attribute Name | Description
--- | ---
binding | JSF: The attribute takes a value-binding expression for a component property of a backing bean
id | JSF: Every component may have a unique id that is automatically created if omitted
rendered | JSF: If "false", this component is not rendered

Table 6.50. Component identification parameters

Name | Value
--- | ---
component-type | org.ajax4jsf.Portlet
component-family | org.ajax4jsf.component.Portlet
component-class | org.ajax4jsf.component.html.HtmlPortlet

#### 6.5.2.2. Creating the Component with a Page Tag

To create the simplest variant on a page use the following syntax:

    <f:view>

         <a4j:portlet>

              ...

         </a4j:portlet>

    </f:view>

#### 6.5.2.3. Creating the Component Dynamically Using Java

    import org.ajax4jsf.component.html.HtmlPortlet;

    ...

    HtmlPortlet myPortlet = new HtmlPortlet();

    ...

#### 6.5.2.4. Details of usage

The main component purpose is realization of possibility to create several instances the same portlet on one page. But clientId of elements should be different for each window. In that case namespace is used for each portlet. The <a4j:portlet> `implemets NaimingContainer` interface and adds namespace to all componets on a page. All portlet content should be wrapped by <a4j:portlet> for resolving problems mentioned before.

#### 6.5.2.5. Relevant resources links

Vizit the Portlet page at RichFaces LiveDemo for examples of component usage and their sources.

Useful publications:

- Ajax4Jsf Users Forum — check the forum for additional information about component usage;

- portal-echo application — Portlet Sample, could be checked out from JBoss SVN;

- First snapshot with Portal environment support contains usage instructions for the Portlet Sample demo.

- Prev6.5.1. < a4j:page > a...
- Top of page
- Front page
- Next6.5.3. < a4j:htmlCommandLink > ...