title: wrong oldValue and newValue in valueChangeListener when using it together with a validator in a JSF page
body: <p>I am using a vlaidator and a valuechangeListener in a h:inputText field like this.</p>
  
  <pre><code>&lt;h:inputText id="quantityInput" required="true"
  validator="#{CartController.validateQuantity}"
  value="#{cartLine.quantity}" size="6" maxlength="15"
  styleClass="numeric"
  onchange='updateAndSubmit("#{CartController.rowIndex +1}", "tabs_root:updatedRow")'
  onkeyup='checkEnter(event,"#{CartController.rowIndex +1}", "tabs_root:updatedRow")'
  style="margin-right:0.4em"
  tabindex="#{CartController.tabIndex}"
  valueChangeListener="#{CartController.quantityListener}"&gt;
  &lt;rd:convertNumber
      maxFractionDigits="#{CartController.noOfQuantityDecimals}"
      minFractionDigits="#{CartController.noOfQuantityDecimals}" /&gt;
  &lt;/h:inputText&gt;
  </code></pre>
  
  <p>I am getting the same oldValue and newvalue in my valuechangeListener when I am changing the inputText box. This problem is disappear when I am removing the validator, I am getting the right oldValue and new value in valuechangeListener when I am removing the validator.</p>
  
  <p>What is going on here, do you have any idea?</p>
  
  <p>and here is the validator method</p>
  
  <pre><code>    public void validateQuantity(FacesContext facesContext,
          UIComponent component, Object value) throws ValidatorException,
          Exception {
  
      try {
          if (isCurrentRowItem()) {
              int quantityValidationResult = quantityControl(value,
                      getCurrentGoods());
              if (quantityValidationResult != QUANTITY_OK) {
  
                  setViewErrorColumn(true);
                  FacesMessage msg = new FacesMessage();
                  if (quantityValidationResult == QUANTITY_TO_LOW) {
                      String felTextMiQuant = Text.get(
                              TextProperties.ANGIVENKVANTITETMINDREBESTKVANT,
                              getApUserData().getUser().getCultureSetting());
                      msg.setSummary(felTextMiQuant + " " + minQuantity);
                      getActiveCartAndTemplateTab().getErrorList().put(
                              new Integer(getRowIndex()), msg.getDetail());
                  } else {
                      String felTextMuQuant = Text
                              .get(TextProperties.ANGIVENKVANTITETEJTILLATENMULTIPEL,
                                      getApUserData().getUser()
                                              .getCultureSetting());
                      msg.setSummary(felTextMuQuant + " " + multipleQuantity);
                      getActiveCartAndTemplateTab().getErrorList().put(
                              new Integer(getRowIndex()), msg.getDetail());
                  }
                  // Activate the previous tab, the one containing the errors,
                  // in case the user tries to activate another
                  if (cartAndTemplateController != null)
                      cartAndTemplateController
                              .setActiveTab(cartAndTemplateController
                                      .getActiveTab());
                  throw new ValidatorException(msg);
              } else {
  
                  // if we don't set here it will be impossible to correct more then one error
                  double valueAsDouble;
                  Line line = (Line) getCartEntity()
                          .getLines(getApUserData()).get(validatorCounter);
  
                  if (value instanceof Long) {
                      valueAsDouble = ((Long) value).doubleValue();
                  }
  
                  else if (value instanceof String){
                      valueAsDouble = Double.parseDouble((String) value);
                  }
  
                  else {
                      valueAsDouble = (Double) value;
                  }
                      line.setQuantity(getApUserData(), valueAsDouble);
              }
              validatorCounter++;
          }
      } catch (IllegalArgumentException e) {
  
      }
  
  }
  </code></pre>