I'll take a look.  Thanks for the thorough report, Adam.


-Jorge


----- Original Message ----
From: Adam Constabaris <[EMAIL PROTECTED]>
To: displaytag-user@lists.sourceforge.net
Sent: Tuesday, January 8, 2008 4:44:47 PM
Subject: [displaytag-user] DISPL-292: exporting full list w/HssfExport


[Apologies in advance if this would have been best posted on the 
developers list]

I'm trying to use the DefaultHssfExportView class, and I was unable to 
get it to honor the export.amount=list property; I came across
 DISPL-292 
(http://jira.codehaus.org/browse/DISPL-292) and saw the patch that had 
been posted.  The patch (which has been incorporated into the trunk) 
apparently fixes things for some exports, but it turns out that the POI
 
export (DefaultHssfExportView) ultimately uses

org.displaytag.render.TableWriterTemplate#writeTableBody(TableModel)

to write out the table, and the first bit of code in that method is

RowIterator rowIterator = model.getRowIterator(false);

file: TableWriterTemplate.java
rev: 1132 (trunk)
line: 277

which yields up an iterator that only goes over the current viewable 
page (i.e. not the full list) -- therefore, the patch for DISPL-292
 does 
not work for any export that uses the code in TableWriterTemplate (I 
verified that both trunk and the 1.1.1 release have this flaw).

The "obvious" fix is to change line 277 to read:

RowIterator rowIterator = 
model.getRowIterator(model.getProperties().getExportFullList());

but this seems to result in the entire list being output even when the 
pagesize attribute on the display:table tag is set to a number smaller 
than the list size, and (not surprisingly) breaks a lot of unit tests 
(e.g. PartialListTest).

So obviously the "obvious" patch creates problems at least as big as
 the 
one it's trying to solve.  Does anybody have any further insights here?

AC

-------------------------------------------------------------------------
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-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user






      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
-------------------------------------------------------------------------
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-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to