<?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.LoadScript</entry>
          </row>
          <row>
            <entry>component-family</entry>
            <entry>org.ajax4jsf.LoadScript</entry>
          </row>
          <row>
            <entry>component-class</entry>
            <entry>org.ajax4jsf.component.html.HtmlLoadScript</entry>
          </row>
          <row>
            <entry>renderer-type</entry>
            <entry>org.ajax4jsf.LoadScriptRenderer</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:loadScript src="scripts/someScript.js"/>
]]></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.HtmlLoadScript;
...
HtmlLoadScript myScript = new HtmlLoadScript();
...
]]></programlisting>
  </section>
  <section>
    <title>Key attributes and ways of usage</title>
    <para>
    	As it was mentioned <link linkend="loadScript">above</link> this component returns its value passing it to the
    	 getResourceUR() method of the ViewHandler for this application, and passing 
    	 the result	through 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 script links right from the child 
    	page while using <property>facelets templates</property> .
    </para>
</section>

  <section>
    <title>Relevant resources links</title>
	<para>
	  Some additional information about usage of component can be found
	  <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/script.jsf?c=loadScript">here.
	</ulink>
	</para>
  </section>

</chapter>   