title: JSF action from onChange
body: <p>I'm trying to set up a data table with JSF that has boxes for row total that will sum the row total onChange of any box in the row. the row looks like: </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;tr id="input_row_1"&gt;
  &lt;td id="mondayInput1"&gt;
      &lt;h:inputText id="monday1" size="4" value="#{timesheet.monday1}" required="false" /&gt;
      &lt;!-- &lt;input name="monday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/&gt; --&gt;
  &lt;/td&gt;
  &lt;td id="tuesdayInput1"&gt;
      &lt;h:inputText id="tuesday1" size="4" value="#{timesheet.tuesday1}" required="false" /&gt;
      &lt;!--&lt;input name="tuesday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/&gt; --&gt;
  &lt;/td&gt;
  &lt;td id="wednesdayInput1"&gt;
      &lt;h:inputText id="wednesday1" size="4" value="#{timesheet.wednesday1}" required="false" /&gt;
      &lt;!--&lt;input name="wednesday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/&gt; --&gt;
  &lt;/td&gt;
  &lt;td id="thursdayInput1"&gt;
      &lt;h:inputText id="thursday1" size="4" value="#{timesheet.thursday1}" required="false" /&gt;
      &lt;!--&lt;input name="thursday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/&gt; --&gt;
  &lt;/td&gt;
  &lt;td id="fridayInput1"&gt;
      &lt;h:inputText id="friday1" size="4" value="#{timesheet.friday1}" required="false" /&gt;
      &lt;!--&lt;input name="friday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/&gt; --&gt;
  &lt;/td&gt;
  &lt;td id="saturdayInput1"&gt;
      &lt;h:inputText id="saturday1" size="4" value="#{timesheet.saturday1}" required="false" /&gt;
      &lt;!--&lt;input name="saturday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/&gt; --&gt;
  &lt;/td&gt;
  &lt;td id="sundayInput1"&gt;
      &lt;h:inputText id="sunday1" size="4" value="#{timesheet.sunday1}" required="false" /&gt;
      &lt;!--&lt;input name="sunday1" class="smallInput" type="number" size="2" maxlength="4" min="0"/&gt; --&gt;
  &lt;/td&gt;
  &lt;td&gt;
      &lt;h:inputText id="total1" size="4" value="#{timesheet.total1}" required="false" /&gt;
      &lt;!-- &lt;input name="total1" id="total1" type="text" size="5" readonly="readonly" /&gt; --&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p></p>
  
  <p>so I first tried to add <code>onChange="#{timesheet.setTotal1}"</code> to the day entries but the onChange event calls javascript, not java / JSF code. Can someone help get the total to update?</p>
  
  <p>EDIT: 
  I have accepted BalusC's answer but needed to also include the <code>event</code> attribute to the <code>&lt;f:ajax&gt;</code> tag to get it to work, like so</p>
  
  <pre><code>&lt;h:inputText id="friday1" size="4" value="#{timesheet.friday1}" maxlength="4" required="false" &gt;
      &lt;f:ajax event="change" render="total1" listener="#{timesheet.updateTotal1}" /&gt;
  &lt;/h:inputText&gt;
  </code></pre>