7 Replies Latest reply on Apr 7, 2011 9:31 AM by qaelbdj

    Modal rerender problem

    qaelbdj

           Hello! I have a problem rerendering a modal panel.

       

      I have the following command button (tried with ajaxsingle attribute too)

      <a4j:commandButton value="Convert"   action="#{extLinkBean.ConvertAction}"

                                      reRender="modal_DBDataShow"

                                      oncomplete="Richfaces.showModalPanel('modal_DBDataShow')" />

       

       

      That executes an action and renders the following modal.

       

      <rich:modalPanel id="modal_DBDataShow" minHeight="145"

          minWidth="220" width="220" height="145">

                  <f:facet name="controls">

                      <h:panelGroup>

                          <h:graphicImage value="/resources/imgs/modal/close.png"

                              styleClass="hidelink"

                              onclick="Richfaces.hideModalPanel('modal_DBDataShow');return false;" />

                      </h:panelGroup>

                  </f:facet>

                  <a4j:region>

       

                  <rich:dataTable id="dtbPars" columns="2" value="#{extLinkBean.lastResultSet.parameters}" var="parm"

                  width="100%" cellpadding="0" cellspacing="0" >

                      <h:outputText>#{parm.field.table.tablename}.#{parm.field.fieldname}</h:outputText>

                      <h:outputText>#{parm.value}</h:outputText>

                  </rich:dataTable>

       

              </rich:modalPanel>

       

      extLinkBean.lastResultSet.parameters is called and it returns a list with 1 element. But the items of that collections never  fire the "getField" or "getValue" methods.

       

      The collection (extLinkBean.lastResultSet.parameters) is loaded during "extLinkBean.ConvertAction" execution. I need to rerender the modal after executing that.

      What am I doing wrong?

       

      Thank you!

        • 1. Modal rerender problem
          nbelaevski

          Hi Tony,

           

          'param' is implicit variable in JSF, so use another name.

          • 2. Modal rerender problem
            qaelbdj

            I have already tried other names with no success.

            • 3. Modal rerender problem
              nbelaevski

              I'm sorry, the problem was not in 'parm' name - table component requires content to be placed into rich:column.

              • 4. Modal rerender problem
                qaelbdj

                I tried changing the datatable source to

                 

                            <rich:dataTable id="dtbPars" columns="2" value="#{extLinkBean.lastResultSet.parameters}" var="parm"

                            width="100%" cellpadding="0" cellspacing="0" >

                                 <rich:column>

                                     <h:outputText>#{parm.field.table.tablename}.#{parm.field.fieldname}</h:outputText>

                                     <h:outputText>#{parm.value}</h:outputText>

                                 </rich:column>

                            </rich:dataTable>

                 

                and it didnt worked =(

                • 5. Modal rerender problem
                  qaelbdj

                  Didnt solved this issue yet.

                  Any other help?

                  • 6. Modal rerender problem
                    ilya_shaikovsky

                    just works in all local tests and not enough info to see where the problem could lie. If the same will start to work if you will move dataTable outside of the modal panel? Post more complete case code or even better try to create minified sample for usage on our side.

                    • 7. Modal rerender problem
                      qaelbdj

                      I solved taking it out of the Modal panel.


                      Don't know the problem, maybe It was some silly mistake.

                      Thank you.