2 Replies Latest reply on Oct 15, 2012 8:07 AM by ezikoh

    Problem with extendedDataTable

    ezikoh

      Hello

      I have a problem when combined extendedDataTable into modalPanel for show a help.

       

      I have a component rich:extendedDataTable into rich:modalPanel . This modalPanes is call when I click a button from my form, but I have the next problem.

      Before render the page in browser (firefox in my case), the list of data asociated to value of rich:extendedDataTable is call two of tree times. This is problem because is more slowly the render and I not understand why is call the method before render the page in browser, and even not click the button where is programing the evento to call a rich:modalPanel.

       

      As I avoid this behavior?, load because the method does not call the user from the screen?

       

      The code of my rich:extendedDataTable is

       

      <rich:extendedDataTable binding="#{listadoNodos.tableModalFranNodo}"

                                                  onRowMouseOver="this.style.backgroundColor='#B5CEFD'"

                                                  onRowMouseOut="this.style.backgroundColor='#{org.richfaces.SKIN.tableBackgroundColor}'"

                                                  onRowClick="this.style.backgroundColor='#F1F1F1'"

                                                  onRowDblClick="Richfaces.hideModalPanel('modalPanelNodoFran')"

                                                  enableContextMenu="false"

                                                  rows="10"

                                                  width="100%"

                                                  height="350px"

                                                  id="tblNodoFran"

                                                  value="#{listadoNodos.nodos}"

                                                  var="n"

                                                  selectionMode="single"

                                                  selection="#{listadoNodos.selection}">

       

      Is necessary to specify some other parameter?

       

      Thank you for your help.

       


        • 1. Re: Problem with extendedDataTable
          mcmurdosound

          calling getters multiple times is the normal behaviour until you use something like requestscoped factories, seam outjections etc. or simply "cache" the result list of the slow part in your bean somewhere and access that and only initialize the list if not already initialized.

           

          for the modal panel this is normal behaviour too, since it already creates / renders all it's child components, too. (as far as I know ---- we've created our own modal panels in combination with a tag handler so only if you open a modal panel for the first time, the content is generated)

          • 2. Re: Problem with extendedDataTable
            ezikoh

            Than you for you answer, I now understand the process better.