title: JSF:ajax keyup for 2 fields
body: <p>i have 2 autofill fileds empname and empno if i give empno remaining fields should be autofilled from database,same to empname.but the problem is When i insert new empno remaining entered fields has been set to null,same to empname how to solve it.</p>
  
  <pre><code>&lt;h:outputText  value="Employee_no"/&gt;
          &lt;h:inputText id="empp"    value="#{Bean.dto.empno}" &gt;
             &lt;p:ajax event="keyup"  update="empn,des,dep,loc"  listener="#{Bean.Workerno}"/&gt;  
         &lt;/h:inputText&gt;
         &lt;h:outputText value="Employee_Name"/&gt;
         &lt;h:inputText id="empn"  value="#{Bean.dto.empname}" &gt;
           &lt;p:ajax event="keyup" update="empp,des,loc,dep"  listener="#{Bean.WorkerName}"/&gt;  
         &lt;/h:inputText&gt;
         &lt;h:outputText value="Department"/&gt;
         &lt;h:inputText id="dep"    value="#{Bean.dto.de}" /&gt;
         &lt;h:outputText value="Designation"/&gt;
         &lt;h:inputText   id="des"   value="#{Bean.dto.de}" /&gt;
  
          &lt;h:outputText  value="Employee_no"/&gt;
          &lt;h:inputText id="empp"    value="#{Bean.dto.empno}" &gt;
             &lt;p:ajax event="keyup"  update="empn,des,dep,loc"  listener="#{Bean.Workerno}"/&gt;  
         &lt;/h:inputText&gt;
         &lt;h:outputText value="Employee_Name"/&gt;
          &lt;h:inputText id="empn"  value="#{Bean.dto.empname}" &gt;
           &lt;p:ajax event="keyup" update="empp,des,loc,dep"  listener="#{Bean.WorkerName}"/&gt;  
          &lt;/h:inputText&gt;
          &lt;h:outputText value="D"/&gt;
          &lt;h:inputText id="dep"    value="#{Bean.dto.d}" /&gt;
           &lt;h:outputText value="Designation"/&gt;
          &lt;h:inputText   id="des"   value="#{Bean.dto.de}" /&gt;
  </code></pre>
  
  <p>BEAN</p>