• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Datascroller buttons disappear

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just started learning JSF.
I am using tomahawk datascroller example in my code. Everything including pagination functionality works fine except that the pagination buttons appear only on the first page. When I click to go to next/previous/last/first, they disappear and never come back.
Did anyone face this problem before?
I made the STATE SAVING METHOD as server in web.xml and I used ids for all components. The managed bean is in session scope.
The logs convey that they could not find the graphicImage ids of all pagination buttons - something like this:
HtmlImageRend W Graphic with id id1 has no value (url).
I also tried replacing buttons with outputText, but no luck.
Any help is appreciated.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this working code .................



******************************************
This is dataTable used to display the table
this having 4 main attributes
1)id - id unique for one form
2)value - this is collection or arrayList Object(#{beanname.variablename})
3)var- This is for reference variable(id is used for datascroller)
4)rows - no of rows to display

<t:dataTable id="list" value="#{assetgroupindex.list}" var="list" rows="10">

write your datatable code here

</t:dataTable>
********************************************

Description:
This dataScroller is used for display the first|previous|next|Last Buttons
datatable id attribute and for attribute should same(for="list")
actionListener="#{assetgroupindex.scrollerAction}"

This method add ur java code:
public void scrollerAction(ActionEvent event) {
ScrollerActionEvent scrollerEvent = (ScrollerActionEvent) event;
}


<t:dataScroller fastStep="10" pageCountVar="inactiveTabStyle" pageIndexVar="pageIndex" styleClass="scroller" paginator="true" paginatorTableClass="paginator" paginatorActiveColumnStyle="font-weight:bold;" for="list" paginatorMaxPages="3" actionListener="#{assetgroupindex.scrollerAction}">
<f:facet name="first">
<t:graphicImage align="center" url="/resources/images/arrow-first.gif" border="1"/>
</f:facet>
<f:facet name="last">
<t:graphicImage align="center" url="/resources/images/arrow-last.gif" border="1"/>
</f:facet>
<f:facet name="previous">
<t:graphicImage align="center" url="/resources/images/arrow-previous.gif" border="1"/>
</f:facet>
<f:facet name="next">
<t:graphicImage align="center" url="/resources/images/arrow-next.gif" border="1"/>
</f:facet>
<f:facet name="fastforward">
<t:graphicImage align="center" url="/resources/images/arrow-ff.gif" border="1"/>
</f:facet>
<f:facet name="fastrewind">
<t:graphicImage align="center" url="/resources/images/arrow-fr.gif" border="1"/>
</f:facet>
</t:dataScroller>

*************************************************

Description:
This dataScroller is used for display the no of records.
datatable id attribute and for attribute should same(for="list")

<t:dataScroller rowsCountVar="rowsCount" displayedRowsCountVar="displayedRowsCountVar" firstRowIndexVar="firstRowIndex" lastRowIndexVar="lastRowIndex" pageCountVar="pageCount" pageIndexVar="pageIndex" for="list">
<h:outputFormat value="{0} Records found, displaying {1} record, from {2} to {3}. Page {4} / {5}">
<f:param value="#{rowsCount}"/>
<f:param value="#{displayedRowsCountVar}"/>
<f:param value="#{firstRowIndex}"/>
<f:param value="#{lastRowIndex}"/>
<f:param value="#{pageIndex}"/>
<f:param value="#{pageCount}"/>
</h:outputFormat>
</t:dataScroller>

******************************************************

regards
Babu
 
A. Dusi
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for responding. My code is exactly the same as yours. The facets in the first datascroller(where we specify first, next, last etc.) are displayed only the first page. But they are not on any other page. Everything is fine functionality-wise except for these disppearing facets. I tried changing the images to h:outputText(like this < and >) but the problem persists.
I will try to get latest MyFaces and Tomahawk jars and try it again. I must be using an older version.
If anyone else solved this problem before, please help.
Thanks!
 
Straws are for suckers. Now suck on this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic