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

    Click button in <h:selectOneMenu

    dracola24

      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" />

                            ......

      </h:selectOneMenu>

       

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

       

      <span id="button">

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

                                      actionListener="#{actionContainer.action}"

                                      reRender="id2, id3"

                                      data="#{bean.data}" 

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

                                      <a4j:support event="onclick">

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

                                      </a4j:support>

               </a4j:commandButton>

      </span>

       

       

      How could I include or mix them??

      Thanks in advance