I believe that the issue is that the dataScroller in conjunction with dataTable does not correctly preserve the list contents. From my understanding, the dataScroller is a decorator that limits the indexes that are displayed in the dataTable. When I step through the source, it appears that the dataTable is only serializing the indexes that are currently displayed, not all indexes in the bean. This doesn't seem to be the correct behavior when a data scroller is present, since the collection contains items that are not currently displayed, and should be serialized. Is this a bug?
On Tue, Apr 29, 2008 at 10:37 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > Todd Nine schrieb: > > Hi All, > > I'm trying to use t:dataScroller and t:dataTable together. I have > > everything working when the attribute "preserveDataModel" is left off > > of my data table. However, when I add it and set it to true, my > > dataScroller is no longer rendered when the view is restored. For > > instance, here is a scenario that causes the dataScroller to not get > > rendered. > > > > 1. Admin enters date range > > 2. DB is queried, and the data table is rendered with the scroller. > > 3. Admin scrolls to page 2 > > 4. Admin clicks on a row to view the specifics. This takes them to > > another page > > 5. Admin clicks "back to search results" which simply loads the > > page from step 2 without submitting a date range > > 6. The data table is correctly restored to page 2, however my > > scroller no longer appears. > > > > Is there an attribute I'm missing? I can't seem to get this to work, > > and its becoming very frustrating. I'm using MyFaces 1.2.2 and > > Tomahawk 1.1.6. <http://1.1.6.> Below is the code for my table tag and > > scroller with the body omitted. I have also tried embedding the > > dataScroller in the footer facet of the dataTable, but this doesn't > > seem to make any difference. > > > > > > > > <t:dataTable value="#{reloadRequest.searchResults}" > var="currRequest" > > id="requests" rows="25" rowClasses="oddrow,evenrow" > > styleClass="datatable" preserveDataModel="true"> > > ..... > > </t:dataTable> > > > > <t:dataScroller id="pager" for="requests" pageCountVar="pageCount" > > pageIndexVar="pageIndex" rowsCountVar="rowsCount" > > firstRowIndexVar="firstRowIndex" > > displayedRowsCountVar="displayedRowsCount" > > paginator="true" > > > > paginatorMaxPages="9" paginatorTableClass="paginator" > > paginatorActiveColumnStyle="font-weight:bold;" > > immediate="true" > > renderFacetsIfSinglePage="false" > styleClass="navigation"> > > > > .... > > </t:dataScroller> > > What happens if "renderFacetsIfSinglePage" is set to true? Perhaps for > some reason the datascroller thinks your data model fits on one page? > > Regards, > Simon > >

