[ 
http://jira.codehaus.org/browse/DISPL-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=128936#action_128936
 ] 

Jamie Taylor commented on DISPL-327:
------------------------------------

The change suggested in this issue is included in the patch that I attached to 
DISPL-383.

> 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
>          Issue Type: Bug
>          Components: Paging/Sorting
>    Affects Versions: 1.1
>            Reporter: Manuel Dominguez Sarmiento
>            Priority: Minor
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> 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

        

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to