Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6554137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:39:52+00:00 2026-05-25T12:39:52+00:00

I had a problem on a Jsf page. The datascroller didn’t change pagination of

  • 0

I had a problem on a Jsf page.
The datascroller didn’t change pagination of the dataTable clicking on a number of page (still stay on the first page of the pagination).

  • Richfaces : 3.3.2.SR1
  • Jsf : 1.2
  • JBoss 5.0.1

This code doesn’t change the pagination :

<rich:extendedDataTable id="tableDataTable" value="#{beanController.listTableDataModel}" 
    var="tableItem" selectionMode="single"
    rows="3" width="150px" height="100px" selection="#{beanController.tableSelection}">

    <rich:column sortBy="#{tableItem.code}" width="150px" label="#{msg.table}">
        <h:outputText value="#{tableItem.code}" />
    </rich:column>
    <rich:column sortBy="#{tableItem.code}" width="150px" label="#{msg.table}">
        <h:outputText value="#{tableItem.code}" />
    </rich:column>
</rich:extendedDataTable>
<rich:datascroller id="tableDataScroller" align="center" for="tableDataTable" renderIfSinglePage="false" />

I solved it defining the sortOrder attribute.
This works fine (only one difference : sortOrder="ASCENDING" on a column):

<rich:extendedDataTable id="tableDataTable" value="#{beanController.listTableDataModel}" 
    var="tableItem" selectionMode="single"
    rows="3" width="150px" height="100px" selection="#{beanController.tableSelection}">

    <rich:column sortBy="#{tableItem.code}" width="150px" label="#{msg.table}" sortOrder="ASCENDING">
        <h:outputText value="#{tableItem.code}" />
    </rich:column>
    <rich:column sortBy="#{tableItem.code}" width="150px" label="#{msg.table}">
        <h:outputText value="#{tableItem.code}" />
    </rich:column>
</rich:extendedDataTable>
<rich:datascroller id="tableDataScroller" align="center" for="tableDataTable" renderIfSinglePage="false" />

The question is Why do we have to define the sortOrder to correct the datatable pagination using datascroller ?
Any idea ?

Edit : DataProvider Code

public class BeanDataProvider implements DataProvider<Bean> {


    private static final long serialVersionUID = -3539248649798786324L;

    public BeanDataProvider() {
    }

    public BeanDataProvider(ArrayList<Bean> beans) {
        this.beans = beans;
    }

    private List<Bean> beans;


    public Bean getItemByKey(Object paramObject) {
        Bean resultat = null;
        for (Bean bean : this.getBeans()) {
            if (bean.getIdentifiant().equals(paramObject)) {
                resultat = bean;
                break;
            }
        }
        return resultat;
    }


    public List<Bean> getItemsByRange(int paramInt1, int paramInt2) {
        return this.getBeans().subList(paramInt1, paramInt2);
    }


    public Object getKey(Bean paramT) {
        return paramT.getIdentifiant();
    }


    public int getRowCount() {
        return this.getBeans().size();
    }


    public List<Bean> getBeans() {
        if (beans == null) {
            beans = new ArrayList<Bean>();
        }
        return beans;
    }


    public void setbeans(List<Bean> beans) {
        this.beans = beans;
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:39:53+00:00Added an answer on May 25, 2026 at 12:39 pm

    It is a bug in RichFaces:

    TableSorting – Built-in – pages cannot be switched by
    DataScroller

    When clicked on the numbered page (e.g. 2) in the initial state, page
    wasn’t switched.

    The table was re-rendered well after clicking on the sorted-column’s
    header.

    Upgrading to 3.3.3.Final should help.

    Regarding ExtendedTableDataModel:

    It is available in 3.3.3.Final (org.richfaces.model.ExtendedTableDataModel in richfaces-impl-3.3.3.Final.jar).
    And it is also available in the documentation: http://docs.jboss.org/richfaces/3.3.X/3.3.3.Final/en/apidoc_impl/ (../apidoc_impl/ is used for richfaces-impl, ../apidoc/ is used for richfaces-ui).

    It is not available in RF4. In RF4 explore these classes:

    org.richfaces.model.ArrangeableState
    org.ajax4jsf.model.ExtendedDataModel
    org.richfaces.model.ArrangeableModel
    

    UPDATE:

    Use ExtendedTableDataModifiableModel instead of ExtendedTableDataModel:

    new ExtendedTableDataModifiableModel(dataProvider);
    

    Or even better (when list is used as a data source as in your case):

    new ListDataModel(list);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had a problem that was partially solved. To explain it quickly : I
I had a problem with committing changes after merging two branches of my project
I had this problem before and can't for life of me remember how to
I had no problem at all running the following code on a local server,
I had a problem where I had a series of overlapping CATransition / CAAnimation
I had a problem with set not working in a batch file; it took
I had this problem some time ago and I gave up but lately it
I had a problem in site map path I had navigation bar which take
I had a problem working with the image classes in java. I am creating
I recently had a problem during the deployment of a windows service. Four computers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.