0 Replies Latest reply on Jul 22, 2007 9:27 PM by Ravi Sathish

    "h:selectOneMenu" with Ajax4JSF passing selection to backing

    Ravi Sathish Newbie

      I'm a JSF newbie; Sorry for cross posting in JSF forums; I did not realize the aptness of this forum for my problem

      I have a form with a dropdown; I want to pass my selection on the "fly" to the backing bean by using Ajax4JSF;

      Unfortunately I'm not able to able to pass on the "fly"; However form submit seems to work

      <h:panelGrid columns="2">
       SRB DataTransferScheme *
       <h:selectOneMenu id="dataTransferCombobox" value="#{loginBean.dataTransferScheme}"
       <a4j:support event="onchange" action="#{loginBean.setAuthFields(loginBean.dataTransferScheme)}"
       ajaxSingle="true" immediate="true"/>
      <h:commandButton value="Login" action="#{login.login}"/>
      //LoginBean.java: [the Backing bean]
      public void setAuthFields(String dataTransferScheme)
       System.out.println("dataTransferScheme : "+dataTransferScheme);

      I appreciate any suggestions, feedback