4 Replies Latest reply on Feb 22, 2011 5:23 AM by flowexception

    rich:inputNumberSpinner onupclick and ondownclick with Firefox

    flowexception Newbie

      Hi everybody,

       

      I'm using Richfaces 3.3.3Final. I'm trying to use rich:inputNumberSpinner with a4j:support and events onupclick and ondownclick. Something like that :

       

          <h:form id="spinnerForm">
      
              <rich:inputNumberSpinner value="#{spinnerBean.spinnerNumber}"
                  inputSize="2" cycled="false" enableManualInput="false">
                  <a4j:support event="onupclick" action="#{spinnerBean.printUp}"
                      reRender="spinnerText">
                  </a4j:support>
                  <a4j:support event="ondownclick" action="#{spinnerBean.printDown}"
                      reRender="spinnerText">
                  </a4j:support>
              </rich:inputNumberSpinner>
      
              <h:outputText id="spinnerText" value="#{spinnerBean.spinnerText}" />
      
          </h:form>
      

       

          public class SpinnerBean {
                  private int spinnerNumber;
                  private String spinnerText;
      
                  public int getSpinnerNumber() {
                      return spinnerNumber;
                  }
      
                  public void setSpinnerNumber(int spinnerNumber) {
                      this.spinnerNumber = spinnerNumber;
                  }
      
                  public String getSpinnerText() {
                      return spinnerText;
                  }
      
                  public void setSpinnerText(String spinnerText) {
                      this.spinnerText = spinnerText;
                  }
      
                  public void printUp(){
                      spinnerText = "Up";
                  }
      
                  public void printDown(){
                      spinnerText = "Down";
                  }
          }
      

       

       

      It works in IE. But in Firefox, the object inputNumberSpinner is updated, but nothing happens with the outputText. Methods printUp and printDown seems to not be called.

       

      Is there something I do wrong ?

       

      Thanks.