6 Replies Latest reply on Jun 7, 2010 5:18 PM by lenyas66

    Updating bean properties on submission of a button from different form

    lenyas66

      Could somebody explain to me the behavior I have noticed in processing of XHTML page, which consists of two separate h:forms?

       

      I have a command button on one form, which is used to add rows to the table and update the values on the server.

       

      <a4j:commandButton id="addPortButtonInp" value="Add"

      action="#{qtBeanParam.addProduct}" immediate="false" reRender="selectedProducts,sectorSel,periodicity,grossnet,retTypeLbl,retTypeSel"

      styleClass="command-button">

      </a4j:commandButton>

       

      It also supposed to refresh some components located on other form. I noticed that when these components are refreshed,

      they change the values to the ones from the bean9server), even if I changed them before clicking on the button.

       

       

      If I click another button located on the form that contains components, the values that were changed on the screen are saved to the server properly.

       

      <a4j:commandButton id="runButton" value="Run Report"

       

      action="#{qtBeanParam.processCommonInput}" immediate="false"

      styleClass="command-button"

      oncomplete="doPopup('qtBeanParam', #{qtBeanParam.curIndex})">

       

       

       

       

      </a4j:commandButton>

      action="#{qtBeanParam.processCommonInput}" immediate="false"

      styleClass="command-button"

      oncomplete="doPopup('qtBeanParam', #{qtBeanParam.curIndex})">

       

       

       

       

      </a4j:commandButton>

      Would appreciate advice how I could work around this issue.

       

      Please see XHTML page attached.

       

      Thanks,

       

      Leonid