Table displays incorrectly when a non-PaginatedList is provided after it was
previously displayed with a PaginatedList
----------------------------------------------------------------------------------------------------------------------
Key: DISPL-327
URL: http://jira.codehaus.org/browse/DISPL-327
Project: DisplayTag
Type: Bug
Components: Paging/Sorting
Versions: 1.1
Reporter: Manuel Dominguez Sarmiento
Priority: Minor
In our application, sometimes we provide PaginatedList instances to DisplayTag,
and sometimes we don't. So depending on the action, the same table might be
displaying a PaginatedList or a simple List.
To reproduce the problem, follow these steps in the same session:
1) Display table providing a simple List. It should work as expected.
2) Display the same table providing a PaginatedList. It should work as
expected.
3) Display the same table providing a simple List. The results will NOT be
what you expect. Rows from the previous step (2) will be visible.
The problem seems to be that the reference to the PaginatedList is not
released. The code that seems to be causing this is on TableTag.java, line 855.
if (this.list instanceof PaginatedList)
{
this.paginatedList = (PaginatedList) this.list;
this.list = this.paginatedList.getList();
}
When the list is NOT a PaginatedList, the reference is not released, and the
sole presence of a reference is what triggers the unexpected behaviour. The
fix I propose (tested and seems to work fine) is:
if (this.list instanceof PaginatedList)
{
this.paginatedList = (PaginatedList) this.list;
this.list = this.paginatedList.getList();
} else {
this.paginatedList = null;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel