<?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.LoadStyle</entry>
          </row>
          <row>
            <entry>component-family</entry>
            <entry>org.ajax4jsf.LoadStyle</entry>
          </row>
          <row>
            <entry>component-class</entry>
            <entry>org.ajax4jsf.component.html.HtmlLoadStyle</entry>
          </row>
          <row>
            <entry>renderer-type</entry>
            <entry>org.ajax4jsf.LoadStyleRenderer</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  
  <section>
    <title>Creating on a page</title>
    <para>Simple Component definition on a page:</para>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
    <programlisting role="XML"><![CDATA[<a4j:loadStyle src="styles/style.css"/>
]]></programlisting>
  </section>
  <section>
    <title>Dynamical creation of a component from Java code</title>

  <para>
      <emphasis role="bold">Example:</emphasis>
 </para>
    <programlisting role="JAVA"><![CDATA[import org.ajax4jsf.component.html.HtmlLoadStyle;
...
HtmlLoadScript myStyle = new HtmlLoadStyle();
...
]]></programlisting>
  </section>
  <section>
    <title>Key attributes and ways of usage</title>
    <para>
    	As it was mentioned <link linkend="loadStyle">above</link> this component returns its value passing it to the
    	 getResourceUR() method of the ViewHandler for this application, and passing 
    	 the result	via the encodeResourceURL() method of the ExternalContext.
    </para>
    <para>
    	It means that the Context will be inserts automatically to the link. And calls
    	 like <property>resource://</property> will be properly handled.
    </para>
    <para>
    	Except this - you may be free to put your stylesheet links right from the child 
    	page while using <property>facelets templates</property>.
    </para>
</section>

  
</chapter>   