6 Replies Latest reply on May 16, 2007 7:47 AM by Steven De Groote

    Passing variables with ajax request

    Steven De Groote Newbie

      Hi all,

      I have an a4j:support on an onchange event for a combobox. All fine, that works as it should, except that I lose a parameter.

      When my page is first loaded, I have a http GET parameter "consulting=1". At the time that I change the selected value of my combo box, a request is sent to the server with apparently just that value. Therefore, "consulting=1" is lost and I have false results.

      Here's my code:

       <a4j:region renderRegionOnly="false">
       <h:form id="filter">
       <h:selectOneListbox onchange="submit()" id="cmbProduct" size="1" value="#{projectList.currentProduct}" style="width: 200px">
       <f:selectItems value="#{projectList.availableProducts}"/>
       <a4j:support onsubmit="Richfaces.showModalPanel('busy')" event="onchange" oncomplete="Richfaces.hideModalPanel('busy');sortables_init()" reRender="projectlist"/>
       <h:inputHidden value="#{projectList.consulting}" />

      Does anyone know how to maintain this variable across different requests? As you can see I tried with an inputHidden field but that doesn't get set ater my AJAX request.

      Thank you