title: Hidden Variables in JSF
body: <p>I need to get the hidden variable's value definied in my Facelets file to process a transaction in my bean. I used the below line in the process action method to get the hidden input component. But I am getting <code>null</code>. How can I get the specified hidden input value?</p>
  
  <p>The bean:</p>
  
  <pre><code>UIInput classNameComponent = (UIInput) event.getComponent().findComponent("className");
  </code></pre>
  
  <p>The view:</p>
  
  <pre><code>&lt;ui:composition template="/templates/content.xhtml"&gt;
  ...
      &lt;h:form id="classForm"&gt;
      ...
          &lt;o:dataTable id="classTable"&gt;
          ...
              &lt;f:facet name="import"&gt;
                      &lt;h:inputHidden id="className" value="com.LoadClass" /&gt;
              &lt;/f:facet&gt;
              ...
          &lt;/o:dataTable&gt;
      ...
      &lt;/h:form&gt;
  ...
  &lt;/ui:composition&gt;
  </code></pre>