title: How to pass javascript/cordova value to jsf Managed-Bean.
body: <p>how to pass javascript/cordova value to jsf Managed-Bean. 
  i will edit this value in JSF-Bean and return it to javascript.
  i need this for my cordova application. That works fine without problem in PHP. In PHP i can receive and request values bi-directional in both sides javascript &lt;--> PHP. 
  But my result must be in jsf.</p>
  
  <p>my javascript -phonegap - cordova code:</p>
  
  <pre><code>&lt;script type="text/javascript" charset="utf-8" src="cordova.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      var xmlhttp;
  
      window.onload = function(){ 
          document.addEventListener('deviceready', init, false);
      }
  
      function init() {
          document.getElementById('btnGetTextvalue').addEventListener('click', getData, false);
          xmlhttp = new XMLHttpRequest();
          xmlhttp.onreadystatechange = processReturn;
      }
  
  
      function getData(){
          url="http://localhost:8080/PhoneGapProjectWithJSF/faces/index.xhtml";
          url += "?thisIsMyValue="+document.getElementById('myText').value;
          xmlhttp.open("GET", url, false);
          xmlhttp.send();
      }
  
      function processReturn(){
          document.getElementById('result').innerHTML = xmlhttp.responseText;
  
      }
  &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>  &lt;body&gt;
        &lt;label for="myText"&gt;Wert Eingeben:&lt;/label&gt;
        &lt;input type="text" size="30" maxlenght="40" id="myText"/&gt;&lt;br/&gt;
        &lt;input type="button" value="Pass Value" id="btnGetTextvalue"/&gt;
        &lt;div id=result&gt;&lt;/div&gt;
    &lt;/body&gt;
  </code></pre>
  
  <p>my ManagedBean Code:</p>
  
  <pre><code>@ManagedBean(name = "phoneGapProjectWithJSF")
  @RequestScoped
  public class PhoneGapProjectWithJSF implements Serializable {
  
    @ManagedProperty(value="#{param.thisIsMyValue}")
    private String neuvalue;
  
    public PhoneGapProjectWithJSF() {
    }
  
    public String getNeuvalue() {
        System.out.println(neuvalue);
        return neuvalue;
    }
  
    public void setNeuvalue(String neuvalue) {
        System.out.println(neuvalue);
       this.neuvalue = neuvalue;
    }
  </code></pre>
  
  <p>my index.xhtml:</p>
  
  <pre><code> --------------
   &lt;h:form&gt;
         &lt;h:outputText value="#{phoneGapProjectWithJSF.neuValue}"/&gt;
   &lt;/h:form&gt;
  </code></pre>