voyent
Implementing a scrolling dataPaginator  XML
Forum Index -> Components
Author Message
rthomas

Joined: 01/Feb/2008 00:00:00
Messages: 12
Offline


I want to use a scrolling dataPaginator, and have been looking at the reference manual, the tutorials, the component showcase and the tld documentation. These provide bits and pieces of information, but no complete overview. Is there additional documentation which I am missing?

All I've been able to figure out so far is that I need to add a dataPaginator
within a panelGrid in the same form as my table. So I have:

<ice:dataTable id="accounts" var="account" value="#{accountManager.accounts}" rows="5" >
<ice:column>
..........
</ice:dataTable>
<ice:panelGrid columns="1" columnClasses="standardTable_ColumnCentered">
<ice:dataPaginator id="scroller" for="accounts"
rowsCountVar="rowsCount"
displayedRowsCountVar="displayedRowsCount"
firstRowIndexVar="firstRowIndex"
lastRowIndexVar="lastRowIndex"
pageCountVar="pageCount"
pageIndexVar="pageIndex"/>
</ice:panelGrid>

.. and added the six variables to my "account" bean. I'm not sure if the scroll bar is supposed to be visible when there are less rows than the maximum, but when I added a sixth row, the table simply displayed the first five, and no scroller. Clearly I must be missing something here.

Does the 1.7.1 version of the showcase have more complete examples?

On a separate but related topic, I'm baffled by what I see if I look at the page source in a browser. In the case of the Data Paginator in the showcase, if I view the source (either in IE or Mozilla), I find no trace of the paginator, or indeed of any of the text on e.g. the Data Paginator tab.

I'm new to JSF/Facelets technology, and browser UI implementation in general, so I must be ignorant of some pretty basic concepts here.

Any help or advice appreciated.
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


You have to define a bunch of facets. Confusingly, there are several dataPaginators in the component-showcase, one for controlling which page to show, and the other for displaying paging information. This is the one you want to emulate:
Code:
             <ice:dataPaginator id="dataScroll_1"
                    rendered="#{dataScrollingModel.selectedDataScrollModes[dataScrollingModel.selectedDataScrollMode].pagingEnabled}"
                    for="data"
                    vertical="#{dataTableBean.vertical}"
                    fastStep="3"
                    paginator="true"
                    paginatorMaxPages="4">
                 <f:facet name="first">
                     <ice:graphicImage id="firstpage_1"
                                       url="#{styleBean.imageDirectory}arrow-first.gif"
                                       style="border:none;"
                                       title="#{msgs['page.dataScrolling.firstpage']}"/>
                 </f:facet>
                 <f:facet name="last">
                     <ice:graphicImage id="lastpage_1"
                                       url="#{styleBean.imageDirectory}arrow-last.gif"
                                       style="border:none;"
                                       title="#{msgs['page.dataScrolling.lastpage']}"/>
                 </f:facet>
                 <f:facet name="previous">
                     <ice:graphicImage id="previouspage_1"
                                       url="#{styleBean.imageDirectory}arrow-previous.gif"
                                       style="border:none;"
                                       title="#{msgs['page.dataScrolling.previouspage']}"/>
                 </f:facet>
                 <f:facet name="next">
                     <ice:graphicImage id="nextpage_1"
                                       url="#{styleBean.imageDirectory}arrow-next.gif"
                                       style="border:none;"
                                       title="#{msgs['page.dataScrolling.nextpage']}"/>
                 </f:facet>
                 <f:facet name="fastforward">
                     <ice:graphicImage id="fastforward_1"
                                       url="#{styleBean.imageDirectory}arrow-ff.gif"
                                       style="border:none;"
                                       title="#{msgs['page.dataScrolling.fastforward']}"/>
                 </f:facet>
                 <f:facet name="fastrewind">
                     <ice:graphicImage id="fastrewind_1"
                                       url="#{styleBean.imageDirectory}arrow-fr.gif"
                                       style="border:none;"
                                       title="#{msgs['page.dataScrolling.fastbackward']}"/>
                 </f:facet>
             </ice:dataPaginator>

[Email]
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Are you missing the facet tags? Please take a look at the examples for what other tags you need with the dataPaginator.

Philip

.
rthomas

Joined: 01/Feb/2008 00:00:00
Messages: 12
Offline


The example you provide looks like it is for the "paging" approach using buttons (next page, fast forward etc.). What I want is a vertical scroll bar, like the one shown in the component showcase when the "Scrolling" option is selected.
mark.collette


Joined: 07/Feb/2005 00:00:00
Messages: 1692
Offline


I don't think that approach uses paging. It just adds scrollbars, such that you always see the table header, and are just scrolling the data rows.
[Email]
asherwin

Joined: 27/Jun/2008 00:00:00
Messages: 108
Offline


Yes, i just don't think he knows how to do it... There is no dataPaginator associated with that dataTable. It's just a dataTable with scrollable="true" attribute set.
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team