title: Custom JSF Components. When use UIComponentELTag
body: <p>To create a custom component in JSF, it is necesary create a class that extends UIComponent and register its component type in JSF,using for example @FacesComponent. To use this component and its attributes in a facelets page, it is necesary link the component with the facelets tag in a special file called tag description file:</p>
  
  <pre><code>&lt;tag&gt;
      &lt;tag-name&gt;test&lt;/tag-name&gt;
      &lt;component&gt;
          &lt;component-type&gt;local.test.component_type&lt;/component-type&gt;
      &lt;/component&gt;
  &lt;/tag&gt;
  </code></pre>
  
  <p>Ok, but I'm confused with the use of tag classes (and tag handlers). Looking at mojarra source code, all html basic components are declared in the tag library description file using a component tag class that extends UIComponentELTag. For example:</p>
  
  <pre><code>&lt;tag&gt;
     &lt;name&gt;commandButton&lt;/name&gt;
      &lt;tag-class&gt;
          com.sun.faces.taglib.html_basic.CommandButtonTag
      &lt;/tag-class&gt;
  &lt;/tag&gt;
  </code></pre>
  
  <p>Looking at JSF api of UIComponentELTag:</p>
  
  <blockquote>
    <p>UIComponentELTag specializes its superclass to allow for properties that take their values from EL API expressions.</p>
    
    <p>This tag is designed for use with Faces version 1.2 and JSP version 2.1 containers.</p>
  </blockquote>
  
  <p>Then the question is, when I should use a class that extends a UIComponentELTag to link the tag attributes with the custom component instead of to link the component through ?
  If I don't use a tag class, then my comonent cannot be used in JSP pages or previous JSF versions and only will work in JSF facelets?</p>