<?xml version='1.0' encoding='UTF-8'?>
<chapter>
  <chapterinfo>
    <keywordset>
      <keyword>a4j:htmlCommandLink</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>javax.faces.HtmlCommandLink</entry>
          </row>
          <row>
            <entry>component-family</entry>
            <entry>javax.faces.Command</entry>
          </row>
          <row>
            <entry>component-class</entry>
            <entry>javax.faces.component.html.HtmlCommandLink</entry>
          </row>
          <row>
            <entry>renderer-type</entry>
            <entry>org.ajax4jsf.HtmlCommandLinkRenderer</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  
  <section>
    <title>Creating the Component with a Page Tag</title>
    <para>Component definition on a page is the same as for the original component from the JSF HTML library.</para>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
    <programlisting role="XML"><![CDATA[<a4j:htmlCommandLink value="value" action="action"/>
]]></programlisting>
</section>
  <section>
    <title>Creating the Component Dynamically Using Java</title>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
    <programlisting role="JAVA"><![CDATA[import javax.faces.component.html.HtmlCommandLink;
...
HtmlCommandLink myCommandLink = new HtmlCommandLink();
...
]]></programlisting>
  </section>
  <section>
    <title>Key attributes and ways of usage</title>
    <para>The difference with the original component is that all hidden fields required for command links with the child <emphasis role="bold">
        <property>&lt;f:param&gt;</property>
      </emphasis> elements are always rendered and it doesn't depend on links rendering on the initial page. It solves the problem with invalid links that weren&apos;t rendered on a page immediately, but after some Ajax request.</para>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
    <programlisting role="XML"><![CDATA[<a4j:form>
	...
	<a4j:htmlComandLink action="action" value="link" rendered="#{bean.rendered}">
		<f:param .../>
	<a4j:htmlComandLink>
	...
</a4j:form>
]]></programlisting>
<para>In this example <emphasis role="bold">
        <property>&lt;a4j:htmlCommandLink&gt;</property>
      </emphasis>works as standard <emphasis role="bold">
        <property>&lt;h:commandLink&gt;</property>
      </emphasis>, but here hidden fields required for correct functionality are rendered before the first downloading of a page, though it doesn't happen if its attribute isn't set to &quot;false&quot;.</para>
      </section>
	  
  <section>
    <title>Relevant resources links</title>
	<para>
	  <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/htmlCommandLink.jsf?c=htmlCommandLink">On RichFaces LiveDemo page </ulink> you can found some additional information for <emphasis role="bold"
	    ><property>&lt;a4j:htmlCommandLink&gt;</property></emphasis> component usage.  
	</para>
    <para>
      <ulink url="http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/param.html">On RichFaces LiveDemo page </ulink> you can found some additional information about <emphasis role="bold"><property>&lt;f:param&gt;</property></emphasis> component.
    </para>
  </section>	  
</chapter>
