Another possible is that you set the rendered attribute of the
datascroller to false or true at the point where you get your list for the
datatable in the backing bean.
e.g
something like that in your backing bean:
rowList is the result you will display on the datatable. In my example a
datascroller will only be displayed if the list contains more than 5
items.
if (rowList.size() > 5)
{
dbAdminDto.setShowDatascroller(true);
}
else {
dbAdminDto.setShowDatascroller(false);
}
dbAdminDto.setShowDatascroller(true);
}
else {
dbAdminDto.setShowDatascroller(false);
}
in the
JSP:
<t:dataScroller...
rendered="#{dbAdminDto.showDatascroller}"
...
/>
I hope
it's clear, what I mean...
Regards
Andy
-----Ursprüngliche Nachricht-----I'm trying to render a dataScroller only when the number of rows of the table are greater than rows exibited on a page.
Von: Vladimir Coutinho [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 12. Januar 2006 13:08
An: myfaces user list
Betreff: dataScroller
I tried this : rendered="#{((rowsCount>displayedRowsCountVar) ? true : false)}" , but the dataScroller is not displayed, despite the number of rows.
...................
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
...................
<t:dataScroller id="scroll_1"
for=""
fastStep="3"
pageCountVar="pageCount"
pageIndexVar="pageIndex"
rowsCountVar="rowsCount"
styleClass="scroller"
displayedRowsCountVar="displayedRowsCountVar"
firstRowIndexVar="firstRowIndex"
lastRowIndexVar="lastRowIndex"
pageCountVar="pageCount"
paginator="true"
paginatorMaxPages="6"
paginatorTableClass="paginator"
rendered="#{((rowsCount>displayedRowsCountVar) ? true : false)}"
paginatorActiveColumnStyle="font-weight:bold;">
......................
______________________________________________________________________ This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. ______________________________________________________________________

