title: How to update specific values of a form after ajax actionListener call?
body: <p>My main form is the following:</p>
  
  <pre><code>&lt;h:form id="frmSearch" styleClass="m-bottom"&gt;
  
      &lt;div class="form-group"&gt;
          &lt;label&gt;Funcionário&lt;/label&gt;
          &lt;h:inputText id="funcionario" value="#{escalaTrabalhoBean.entityToSearch.funcionario.pessoa.nome}" readonly="true" styleClass="form-control" /&gt;
          &lt;h:commandButton id="btnFuncionario" styleClass="btn btn-default" value="Buscar funcionário" onclick="$('#modBuscaFuncionario').modal('show')" type="button" /&gt;
      &lt;/div&gt;
  
  &lt;/h:form&gt;
  </code></pre>
  
  <p>And I want to update the value of field "funcionario" after I call a function with ajax, which is inside a modal window:</p>
  
  <pre><code>&lt;h:form id="frmSearchBuscaFuncionario"&gt;
      &lt;h:commandLink id="btnSelecionar" title="Selecionar" actionListener="#{escalaTrabalhoBean.selectFuncionario(obj)}"&gt;
          &lt;i class="fa fa-pencil-square-o"&gt;&lt;/i&gt;
          &lt;p:ajax oncomplete="$('#modBuscaFuncionario').modal('hide');" update="frmSearch:funcionario" /&gt;
      &lt;/h:commandLink&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>This code: update="frmSearch:funcionario" is not working, and I got this error: javax.faces.FacesException: Cannot find component with identifier "frmSearch:funcionario".</p>
  
  <p>Any suggestions?</p>