Hi,

I have three different SelectOneMenu components with ValueChangeListeners.
Each ValueChangeListener calles the same method!

If you now change the value from one of the selectOneMenus all three ValueChangeListener will be called, so the processValueChangePosResult method is called three times.

I tried it also with three different ValueChangeListener methods. But each time you change
one of the selectOneMenu's values all three changeListeners will be called.

I suppose it depends on the onchange="submit()" method, because it appears in all three menus...

Any suggestions?
Thanks!
Wolfgang


<h:selectOneMenu id="itemPosPicr"
                           rendered="#{currentData.renderedPicrPos}"
valueChangeListener="#{siteChanger.processValueChangePosResult"
                           onchange="submit()">
              <f:selectItems value="#{currentData.itemPosPicr}"/>
          </h:selectOneMenu>

public void processValueChangePosResult(ValueChangeEvent value) throws IOException {

      String selectedValue = (String) value.getNewValue();
      System.out.print(selectedValue);
FacesContext.getCurrentInstance().getExternalContext().redirect("http://www.google.de";);
  }

Reply via email to