title: Change input value with jsf & Ajax
body: <p>I have a problem with the display of what I want. Basically I have a dropdown list and on change of what is inside the dropdown list I want some input of the page that fill in on it own.
  Here is one of the input I want to fill in. I call the listener on a ajax method.
  XHTML Code : </p>
  
  <pre><code>&lt;h:outputText value="Version" styleClass="section-label"/&gt;
              &lt;h:inputText id="version" value="#{contextSchemeDetailBean.contextScheme.schemeVersionId}"
                           required="true" maxlength="45"
                           requiredMessage="Please fill out 'Version' field."
                           label="Version" styleClass="section-content input-section"&gt;
                  &lt;f:validateLength maximum="45"/&gt;
                  &lt;p:ajax listener="#{codeListBaseBean.onSelectCodeList}"/&gt;
              &lt;/h:inputText&gt;
  </code></pre>
  
  <p>The Java code allow me to get the good value of what to fill in those input(GetBlablaFromblabla). </p>
  
  <p>JavaBean Code : </p>
  
  <pre><code> public void onSelectCodeList(SelectEvent event){
      setSelectedCodeListName(event.getObject().toString());
      System.out.println("Element selectionne :" + event.getObject());
      System.out.println("Agency Id correspondant :" + GetAgencyIdFromCodeListName(event.getObject().toString()));
      System.out.println("Version correspondante :" + GetVersionFromCodeListName(event.getObject().toString()));
      //System.out.println("agency id ="+agencyIdListValueRepository.findOne(GetAgencyIdFromCodeListName(event.getObject().toString())).getAgencyIdListValueId());
      //System.out.println("agency id ===="+getAgencyIdListValues());
      //setAgencyIdListValue(agencyIdListValueRepository.findOne(GetAgencyIdFromCodeListName(event.getObject().toString())));
      System.out.println("=======================================");
     }
  </code></pre>
  
  <p>Now what i want to do is to put those value inside my input on each change of the value selected in my dropdown list. I know it must not be hard but i m not familiar with jsf. Thanks !</p>
  
  <p>My droplist is coded like that :</p>
  
  <pre><code>                &lt;h:outputText value="Code List" styleClass="section-label"/&gt;
              &lt;p:autoComplete id="inputCodeList"
                              requiredMessage="Please fill out 'Code List' field."
                              styleClass="section-content input-section"
                              completeMethod="#{codeListBean.completeInput}"
                              dropdown="true" scrollHeight="220"
                              itemValue="#{codeListBaseBean.codeList.listId}"&gt;
                  &lt;p:ajax event="itemSelect" listener="#{codeListBaseBean.onSelectCodeList}"/&gt;
              &lt;/p:autoComplete&gt;
  </code></pre>
  
  <p>-S</p>