3 Replies Latest reply on Feb 5, 2009 4:15 AM by ilya_shaikovsky

    Submit form in modalPanel. How pass params to action?

    wessen

      My page:

      <ui:composition>
      
       <rich:modalPanel id="delDemandConfirm"
       width="350" height="100" autosized="true" >
      
       <a4j:outputPanel id="modalContent" >
       <h:form>
       Remove: #{removeDemand.selectedDemand.person.lastName}
       #{removeDemand.selectedDemand.person.firstName}
       #{removeDemand.selectedDemand.person.middleName} ?
       <p/>
       <div align="center">
       <h:commandButton id="delete" value="Delete"
       actionListener="#{removeDemand.removeDemand}"
       action="demandslist">
       <a4j:actionparam value="#{removeDemand.selectedDemand.id}"
       assignTo="#{removeDemand.selectedDemandId}"/>
       </h:commandButton>
       <rich:spacer width="10"/>
       <h:commandButton id="cancel" value="Cancel">
       <rich:componentControl for="delDemandConfirm" attachTo="cancel"
       event="onclick" operation="hide" />
       </h:commandButton>
       </div>
       </h:form>
       </a4j:outputPanel>
       </rich:modalPanel>
      
      
       <h:form>
       <rich:dataTable id="demandsListTable"
       binding="#{demandsList.demandsTable}"
       var="demand"
       value="#{demandsList.demands}">
       <rich:column>
       <a4j:commandButton id="removeDemand" title="Delete demand" image="#{demand.removeImage}" ajaxSingle="true"
       disabled="#{demand.editable}" action="#{demandsList.selectDemandForRemove}"
       oncomplete="Richfaces.showModalPanel('delDemandConfirm')" reRender="modalContent">
       </a4j:commandButton>
       </rich:column>
       </rich:dataTable>
       </h:form>
      </ui:composition>



      When I press button "Delete demand" in table row, modalPanel show up. When I press button "Delete" in modalPanel, a4j:actionparam dont work, because field #{removeDemand.selectedDemandId} is null when I process action. Why?