title: How to get Ajax to re-render a field after a valueChangeListener is called?
body: <p>I've got a row of several h:inputText fields to receive numbers and an h:outputText field to display the total of those numbers. When one of the inputText values changes I want to update the underlying database record and then to re-render the total field at the end of the row. E.g. the ui elements are: rcvd0, rcvd1, rcvdTotal. I want all this to happen without submitting the form.</p>
  
  <p>I've managed to capture the value changes and to update the underlying database record(s) by using a valueChangeListener. I'm using the p:ajax tag so I don't have to wait until the form is submiited. So far, so good.</p>
  
  <p>What I can't achieve is re-rendering the total field. Here is the view code for my components:</p>
  
  <pre><code>&lt;h:inputText id="rcvd0" value="#{shareoutSlip.receivedMember[0]}" size="7" valueChangeListener="#{orderFormBean.handleReceivedChange}"&gt;
      &lt;f:converter converterId="bigDecimalPlainDisplay" /&gt;
      &lt;p:ajax render="rcvdTotal" /&gt;
  &lt;/h:inputText&gt;
  
  &lt;h:inputText id="rcvd1" value="#{shareoutSlip.receivedMember[1]}" size="7" valueChangeListener="#{orderFormBean.handleReceivedChange}"&gt;
      &lt;f:converter converterId="bigDecimalPlainDisplay" /&gt;
      &lt;p:ajax render="rcvdTotal" /&gt;
  &lt;/h:inputText&gt;
  
  &lt;h:outputText id="rcvdTotal" value="#{shareoutSlip.receivedTotal}"&gt;
      &lt;f:converter converterId="bigDecimalPlainDisplay" /&gt;
  &lt;/h:outputText&gt;
  </code></pre>
  
  <p>The valueChangeListener method is being called ok and it does the right things. The code doesn't seem to re-render the rcvdTotal field. I've tried all sorts of combinations of ajax attributes in the ajax tag, e.g. execute="rcvd0" render="rcvdTotal". I've also played around with @this, @form, @all as attribute values but to no avail.</p>
  
  <p>I've got to say that I'm fairly pleased with JSF and PrimeFaces but I find the event model to be very confusing, partly due to the lack of a good text or course. If anyone can advise on a good resource covering the event model in particular then I'd be very grateful. It would seem that this is vital for an indepth understanding of JSF. Thank you.</p>