0 Replies Latest reply on Feb 9, 2011 5:30 AM by Blanca Hernandez

    Click button in <h:selectOneMenu

    Blanca Hernandez Newbie

      Hello, I have a functionallity wich is working by clicking a button.

      On other file I want exaclty the same functionallity, but when a <h:selectOneMenu> is changing.

      I don't know how to include an actionListener on it, which would be maybe enough.


      This is my selectOneMenu:


      <h:selectOneMenu id="id1" value="#{bean.value}" style="..." onchange="function(param);">

                            <f:selectItem itemValue="value" itemLabel="Label" />




      And this is the button which holds the functionallity I want to execute:


      <span id="button">

              <a4j:commandButton type="submit" value=" " id="Submit"


                                      reRender="id2, id3"


                                      oncomplete="function1(param1); function2(param2); return false;">

                                      <a4j:support event="onclick">

                                          <f:setPropertyActionListener value="./page1.xhtml" target="#{bean2.value}" />






      How could I include or mix them??

      Thanks in advance