0 Replies Latest reply on Oct 17, 2007 3:50 AM by Andrew Batman

    passing a parameter to valueChangeListener

    Andrew Batman Newbie

      i have to pass a parameter to valueChangeListener in the example:

      <a4j:repeat value="#{bean.getItems()}" var="currentItem">
       <a4j:form ajaxSingle="true">
       <rich:inputNumberSpinner value="#{bean.getSomeOtherBean(currentItem).quantity}" immediate="true" valueChangeListener="#{bean.updateQuantity}">
       <a4j:support event="onchange" reRender="quantityOutputId"/>
       </rich:inputNumberSpinner>
       <s:div id="quantityOutputId">
       <h:outputText value="#{bean.getSomeOtherBean(currentItem).quantity}" />
       </s:div>
       </a4j:form>
      </a4j:repeat>
      


      public void updateQuantity(ValueChangeEvent event){
       getSomeOtherBean(currentItem).setQuantity(event.getNewValue());
      }
      


      how to pass currentItem to listener?
      or is there another way to change "quantity"?