4 Replies Latest reply on Dec 12, 2008 11:20 AM by losintikfos

    AjaxListener

      Hi Guys,

      Quick one!
      Do anyone know how to use <h:selectOneMenu> to trigger ajaxOutputPanel like the one shown below?

      <a4j:outputPanel id="output">
       <h:outputText value="#{bean.message1}" style="display:block"/>
       </a4j:outputPanel>


      I trying to use onChnage event of the <h:selectOneMenu> but dont know how to go about.

      I deas?

        • 1. Re: AjaxListener
          ilya_shaikovsky

          Check out latest version of richfaces-demo from trunk. deploy run and open ajax support sample. There is new tab (second one) where the sample you need.

          • 2. Re: AjaxListener

            Thanks!

            Do anyone know how to retrieve the value send via the form in the bean in the EventListener?

            I am doing something like this;

            public void processRoom(AjaxEvent arg0) {
             //Here arg0 don't seem to have signature to retrieve the value sent
            }




            • 3. Re: AjaxListener

              Hi Guys,

              I am using AjaxListener to pass value name like this

              <a4j:commandLink id="cLink" value="James Brown"
               reRender="output" actionListener="#{bean.process}"/>
              
              <a4j:outputPanel id="output">
               <h:outputText value="#{bean.message1}" style="display:block"/>
              </a4j:outputPanel>
              



              Bean:

              public void process(AjaxEvent arg0) {
               //Extract the value sent via the request
              }
              



              My question is! i dont seem to get any method signature to retrieve the value sent. Do anyone know how to extract the value?

              • 4. Re: AjaxListener

                The value is coming from this instead! sorry for using link

                <h:selectOneMenu id="loc" value="#{ServiceRequest.loca}" label="Location" required="true">
                <f:selectItems value="#{ServiceRequest.location}"/>
                <a4j:support reRender="output" actionListener="#{ServiceRequest.process}" event="onchange"> </a4j:support>
                </h:selectOneMenu>