0 Replies Latest reply on May 30, 2012 2:08 PM by Pawel Zmarlicki

    <rich:dataScroller> not working when returning to page with data table

    Pawel Zmarlicki Newbie

      I'm using RichFaces 4.2.2 with JSF Mojarra 2.1.5.

       

      I have a page with an instance of <rich:dataScroller> in a footer of a data table.  The scroller works correctly, until I navigate to a detail page corresponsing to one of the data rows, and then back to the index page, where the table with the dataScroller is located.  At this point I get script error "Object Expected" pointing to the statement beginning with: new RichFaces.ui.DataScroller("myForm:dataScrollerId",...

       

      This happens only if I use <rich:dataScroller> with the binding attribute.

       

      Upon closer look, I've noticed that the the following tags are rendered as part of the page before navigating to detail, but not when navigating back:

      <script type="text/javascript" src="/mywebapp/javax.faces.resource/datascroller.js.jsf?ln=org.richfaces"></script><link type="text/css" rel="stylesheet" href="/mywebapp/rfRes/datascroller.ecss.jsf?db=eAHb1WuhCAAFJAGh&amp;ln=org.richfaces" />

       

      The missing code explains the script error, which in turns explains why the data scroller does not work, and is rendered as plain text.

      Does anybody know why the script and link tags are not rendered, and how to fix this problem?