title: getting input values from javascript in bean
body: <p>First of all I'm no javascript expert at all, actually I am totally new to javascript. The function I use is copy pasted and edited, so I am rly not into this. For some how I can not figure out how to resolve the input text from that form. 
  Javascript code:</p>
  
  <pre><code>function addInput(type) {
       // Create an input type dynamically.
       var element = document.createElement("input");
       // Assign different attributes to the element.
       element.setAttribute("type", "text");
       //element.setAttribute("value", type);
       element.setAttribute("name", "text");
       var foo = document.getElementById("fooBar");
       // Append the element in page (in span).
       foo.appendChild(element);
  };
  </code></pre>
  
  <p>The method call in xhtml is :   </p>
  
  <pre><code>&lt;h:form&gt;
  &lt;h:messages infoClass="success" errorClass="error"
      warnStyle="warning" /&gt;
  
  &lt;div class="info"&gt;
      &lt;span class="required"&gt;*&lt;/span&gt;
      &lt;h:outputText value=" = #{msg['required']}" /&gt;
  &lt;/div&gt;
  
  &lt;div class="widget box" style="width: 40%; float: left"&gt;
      &lt;div class="widget-header"&gt;
          &lt;i class="fa fa-bars" /&gt; #{msg['common']}
      &lt;/div&gt;
      &lt;div class="widget-content"&gt;
          &lt;div class="form_wrapper"&gt;
              &lt;label&gt;#{msg['projectname']}:&lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
              &lt;h:inputText class="inputText"
                  value="#{projectBean.project.name}" label="#{msg['firstname']}"
                  required="true" autocomplete="off" /&gt;
              &lt;util:helptext helptext="#{msg['projectname.desc']}" show="true" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="widget box" style="width: 40%; float: left"&gt;
      &lt;div class="widget-header"&gt;
          &lt;i class="fa fa-bars" /&gt; #{msg['workpackage']}
      &lt;/div&gt;
  
      &lt;div class="widget-content"&gt;
          &lt;label&gt;#{msg['workpackagename']}:&lt;/label&gt;&lt;br /&gt;
              &lt;span id="fooBar"&gt;&lt;br /&gt;&lt;/span&gt; &lt;INPUT type="button" value="Add"
                  onclick="addInput()" /&gt;
  
          &lt;div style="clear: left;"&gt;&lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div style="clear: left;"&gt;
      &lt;h:commandButton id="button" class="button"
          value="#{msg['button.save']}"
          action="#{projectBean.createProject}" /&gt;
  &lt;/div&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>But how do I get the values of the input text in my bean? </p>