2 Replies Latest reply on Apr 7, 2011 10:16 AM by Tony Tony

    Data Binding in rich datatable inside a rich modal panel

    Tony Tony Newbie

      I have a modal panel with a datatable inside it. Datatable "dtbParameters" is binded to the list extLinkBean.parametersBuffer.

      This modal is shown when I press cmdBtn command Button.

      When I click Accept in the modal, jsFunction doSql is executed (and extLinkBean.ConvertToConditionAction server procedure) and other modal is shown.

       

      Te problema is that the #{parameter.value}" field is still null in the event  extLinkBean.ConvertToConditionAction, it does not catch the input text written by the user in the datatable.

       

       

       

       

       

      This is a cleaned version of the code.

      Here is how I call my modal panel

                      <a4j:commandButton id="cmdBtn" value="Test" action="#{extLinkBean.ReadParemeterList}"  reRender="dtbParameters"

                                      oncomplete="Richfaces.showModalPanel('modal_InputDBData')"  ajaxSingle="#{true}"/>

                      <a4j:jsFunction name="doSql" reRender="dtbPars" 

                      action="#{extLinkBean.ConvertToConditionAction}"                   

                      oncomplete="#{rich:component('modal_DBData')}.show()" />

       

      <rich:modalPanel id="modal_InputDBData">

                  <a4j:region>

                      <h:form>

                          <h:panelGroup >

                              <div style="display:block; margin-left: auto; margin-right:auto; text-align:center; margin-top: 20px;">

                              <rich:dataTable id="dtbParameters" columns="2" value="#{extLinkBean.parametersBuffer}" var="parameter">           

                                          <rich:column><h:outputText>#{parameter.fieldname}</h:outputText></rich:column>

                                          <rich:column> <h:inputText value="#{parameter.value}"/></rich:column>

                               </rich:dataTable>                               

                                  <input type="button" value="Accept"

                                          onclick="#{rich:component('modal_InputDBData')}.hide();doSql();return false;" />                                           

                              </div>                       

                          </h:panelGroup>

                      </h:form>

                  </a4j:region>

              </rich:modalPanel>

       

      <rich:modalPanel id="modal_InputDBData">

      </rich:modalPanel>

       

       

       

      Please help!