1 Reply Latest reply on Dec 23, 2008 1:56 AM by Michael Abele

    modalPanel and dataTable

    Greg Zoller Newbie

      Hello,

      I'm trying a design aimed at addressing a performance problem I'm having with a feature-rich dataTable. My table rows had several heavy rich widgets on each line so once I get 40 or 50 rows in my table things start to bog down a lot.

      So I decided to get rid of the rich widgets on the default view and let the user click on editable items in the row, which will pop up some kind of panel to allow editing of the values.

      I haven't been successful finding any examples of this kind of behavior (modalPanel populated by a specific row from a dataTable and being able to update that data from the panel so it will appear correctly when the dataTable is reRendered).

      Anyone have any examples of this kind of thing? I'm using JSF/Seam/RF.

      Thanks,
      Greg

        • 1. Re: modalPanel and dataTable
          Michael Abele Newbie

          Not a complete example, but this might help you ...

          Define an <a4j:support> onRowClick event trigger, pass a key value of the selected line to a backing bean value (f:setProperty...)

          <rich:dataTable id="attributes" value="#{bean.list}" var="line">
           <a4j:support event="onRowClick" reRender="attGrid" action="#{bean.loadSelectedRow}" oncomplete="Richfaces.showModalPanel('attributeDetail',{width:300, height: 100, top:150});">
           <f:setPropertyActionListener target="#{bean.selectedRowAttID}" value="#{line.attributeNumber}" />
           </a4j:support>
          ...
          </rich:dataTable>
          


          Regards,
          Michael