Issue Details (XML | Word | Printable)

Key: DISPL-303
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Reporter: Emmanuel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DisplayTag

External paging paging.banner.some_items_found displays 1-10 always

Created: 08/Mar/06 09:09 AM   Updated: 19/Mar/06 03:11 PM
Component/s: Paging/Sorting
Affects Version/s: 1.1
Fix Version/s: 1.1.1

Time Tracking:
Not Specified

Application server: t


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
lizongbo added a comment - 14/Mar/06 06:49 AM
we can fix this bug by follow code:

java file : displaytag-all/displaytag/src/main/java/org/displaytag/pagination/SmartListHelper.java

method need update : getFirstIndexForCurrentPage && getLastIndexForCurrentPage.
new code :
-------------------
    public int getFirstIndexForCurrentPage() {
        return (this.currentPage - 1) * this.pageSize;
    }

    protected int getLastIndexForCurrentPage() {
        if (this.partialList) {
            return (getFirstIndexForCurrentPage()) +
                    Math.min(this.pageSize - 1, this.fullList.size() - 1);
        } else {
            return getLastIndexForPage(this.currentPage);
        }
    }

-------------------


Kevin Conaway added a comment - 16/Mar/06 04:46 PM
Please see the patch attached to DISPL-304

fabrizio giustina added a comment - 19/Mar/06 03:11 PM