<?xml version='1.0' encoding='UTF-8'?>
<chapter>

  <table>
    <title>Component identification parameters </title>
    <tgroup cols="2">
      <thead>
        <row>
          <entry>Name</entry>
          <entry>Value</entry>
        </row>
      </thead>
      <tbody>
        <row>
          <entry>component-type</entry>
          <entry>org.ajax4jsf.Portlet</entry>
        </row>
        <row>
          <entry>component-family</entry>
          <entry>org.ajax4jsf.component.Portlet</entry>
        </row>
        <row>
          <entry>component-class</entry>
          <entry>org.ajax4jsf.component.html.HtmlPortlet</entry>
        </row>
      </tbody>
    </tgroup>
  </table>

  <section>
    <title>Creating on a page</title>
    <programlisting role="XML"><![CDATA[
<f:view>
	<a4j:portlet>
	...
	</a4j:portlet>
</f:view>
]]></programlisting>
  </section>

  <section>
    <title>Dynamical creation of a component from Java code</title>
    <programlisting role="JAVA"><![CDATA[
import org.ajax4jsf.component.html.HtmlPortlet;
...
HtmlPortlet myPortlet = new HtmlPortlet();
...]]></programlisting>
  </section>

  <section>
    <title>Key attributes and ways of usage</title>
    <para> Portal page can include some instances of the same portlet but clientId of elements
      should be different for each window. In that case &apos;namespace&apos; is used for
      each portlet. The <emphasis role="bold">
        <property>&lt;a4j:portlet&gt;</property>
      </emphasis> implemets NaimingContainer interface and adds namespace to all componets on a
      page. All portlet content should be wrapped by <emphasis role="bold">
        <property>&lt;a4j:portlet&gt;</property>
      </emphasis> for resolving problems mentioned before. </para>

  </section>
  <section>
    <title>Relevant resources links</title>
    <para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/portlet.jsf?c=portlet"
        >Here</ulink> you can see the example of <emphasis role="bold">
        <property>&lt;a4j:portlet&gt;</property>
      </emphasis> usage and sources for the given example. </para>
    <para> The aditional information about component usage you can find here: <ulink
        url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=107325"
        >Ajax4Jsf Users Forum. </ulink>
    </para>
    <para>Portlet Sample could be checked out from JBoss SVN: <ulink
        url="http://anonsvn.jboss.org/repos/ajax4jsf/trunk/samples/portal-echo/">portal-echo
        application. </ulink>
    </para>
    <para>Usage instructions for this demo could be found at the corresponding: <ulink
      url="http://www.jboss.com/index.html?module=bb&amp;op=viewtopic&amp;t=107325">portal-echo
      application. </ulink></para>
  </section>
</chapter>
