Not that I am aware of, however it would
be a simple change to add, I would recommend asking the dev community to add
this functionality. As a workaround you could add multiple scroller components
and only render the one you want passed on your page, this is sloppy but would
work: for example (sorry about the incomplete code I am at work and don’t
have time to give you actual working examples)
<dataScroller id=”ds1”
rendered=”#{page1}”>
<facet name=”previous”/>
<facet name=”next”/>
<facet name=”last”/>
</dataScroller>
<dataScroller id=”ds2”
rendered=”#{!page1 && !pageLast}”>
<facet name=”first”/>
<facet name=”previous”/>
<facet name=”next”/>
<facet name=”last”/>
</dataScroller>
<dataScroller id=”ds3”
rendered=”#{pageLast}”>
<facet name=”first”/>
<facet name=”previous”/>
<facet name=”next”/>
</dataScroller>
From: Tom Butler
[mailto:[EMAIL PROTECTED]
Sent: Thursday, January 12, 2006
9:33 PM
To: 'MyFaces Discussion'
Subject: RE: dataScroller
Is there an easy way to further control
the datascroller functionality – specifically, not display the
‘previous’ or ‘first’ control if on the first page of
data (and also not display the ‘next’ or ‘last’ control
if on the last page of data)?
From: Miller, John
[mailto:[EMAIL PROTECTED]
Sent: Thursday, January 12, 2006
8:55 AM
To: MyFaces
Discussion
Subject: RE: dataScroller
DataScroller by default will not render if
there is only one page of data, however the facets will, you can turn this off
by simply adding the following attribute to your datascroller
renderFacetsIfSinglePage="false"
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 12, 2006
7:15 AM
To: [email protected]
Subject: AW: dataScroller
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);
}
rendered="#{dbAdminDto.showDatascroller}"
I hope it's clear, what I mean...
-----Ursprüngliche Nachricht-----
Von: Vladimir Coutinho
[mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 12. Januar
2006 13:08
An: myfaces user list
Betreff: dataScroller
I'm trying to render a dataScroller only when the number of rows of the
table are greater than rows exibited on a page.
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.
______________________________________________________________________
NOTICE: This message, including all attachments transmitted with it, is for the
use of the addressee only. It may contain proprietary, confidential and/or
legally privileged information belonging to Litle & Co. No confidentiality
or privilege is waived or lost by any mistransmission. If you are not the intended
recipient, you must not, directly or indirectly, use, disclose, distribute,
print or copy any part of this message. If you believe you have received this
message in error, please delete it and all copies of it from your system and
notify the sender immediately by reply e-mail. Thank you.