<?xml version='1.0' encoding='UTF-8'?>
<chapter>
  <chapterinfo>
    <keywordset>
      <keyword>a4j:portlet</keyword>
    </keywordset>
  </chapterinfo>
  <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 the Component with a Page Tag</title>
    <para>To create the simplest variant on a page use the following syntax:</para>
    <programlisting role="XML"><![CDATA[
<f:view>
	<a4j:portlet>
	...
	</a4j:portlet>
</f:view>
]]></programlisting>
  </section>

  <section>
    <title>Creating the Component Dynamically Using Java</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> 
	 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 <emphasis role="bold">
        <property>&lt;a4j:portlet&gt;</property>
      </emphasis> <code>implemets NaimingContainer</code> 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 found some additional information for <emphasis role="bold">
        <property>&lt;a4j:portlet&gt;</property>
      </emphasis> component usage. </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>
