title: Need help understanding <p:inputNumber/> with <p:ajax/>
body: <p>I have a Primefaces question that I am having a lot of trouble finding a solution. I have search the Primefaces documentation with no luck. </p>
  
  <p>We are using Primefaces 6.0</p>
  
  <p>I have two <code>&lt;p:inputNumber/&gt;</code> and I want to sum the value of both of them and display in real-time on the screen while the user is typing. My ajax call inside each inputNumber is :</p>
  
  <pre><code>&lt;p:ajax update="totalcount" listener="#{myBean.updateTotalCount()}"/&gt;
  </code></pre>
  
  <p>everything almost works as expected. However totalcount is only updated when focus is lost on the two inputNumber boxes. </p>
  
  <p>I would like for total to be triggered while the user is typing. I have tried to look up the Primefaces documentation and I thought something like </p>
  
  <pre><code>&lt;p:ajax event="change" update="totalcount" listener="#{myBean.updateTotalCount()}"/&gt;
  </code></pre>
  
  <p>would be sufficient but the ajax fails to trigger altogether.</p>
  
  <p>I am not sure if I am just looking in the wrong place or if inputNumber is different from inputText and so not all ajax events are available to me or what.</p>
  
  <p>any sugguestions?</p>
  
  <p>EDIT: added code snippets:</p>
  
  <p>XHTML:</p>
  
  <pre><code>&lt;p:outputPanel id="totalcount"&gt;TOTAL COUNT : #{myBean.totalCount}%&lt;/p:outputPanel&gt;
  
  &lt;p:inputNumber size="3" id="one" value="#{myBean.one}"&gt;
           &lt;p:ajax update="totalcount" listener="#{myBean.updateTotalCount()}"/&gt;
  &lt;/p:inputNumber&gt;
  &lt;p:inputNumber size="3" id="two" value="#{myBean.two}"&gt;
           &lt;p:ajax update="totalcount" listener="#{myBean.updateTotalCount()}"/&gt;
  &lt;/p:inputNumber&gt;
  </code></pre>
  
  <p>BEAN:</p>
  
  <pre><code>int one;
  int two;
  int totalcount;
  ...getter and setters here...
  
  public void updateTotalCount() throws Exception {
       total = one + two;
  }
  </code></pre>
  
  <p>With the code above only when the two inputNumber boxes lose focus will the total be calculated. If I add event="keyup" to both then the AJAX no longer triggers at all. Adding the process attribute does not seem to affect my results in anyway good or bad.</p>