Em Fri, 21 Aug 2009 13:43:09 -0300, Thibaut Gadiolet
<[email protected]> escreveu:
Hi folks,
Hi!
I am sorry for bothering you if it is not necessary but I am looking for
a function allowing to export a grid component to a CSV file.
I know that Thiago wrote something about that but I didn't find it on
Nabble....
http://www.nabble.com/Inheriting-from-Component-Classes-to24355326.html#a24356848
Don't forget to sort by date and include only messages from tapestry-user,
as tapestry-dev receives commit notifications that make it hard to find
what you want.
It could be nice to add such a function to the grid component. Does it
ring a bell to someone?
Not to Grid itself. You can use a mixin for that. ;) Now excuse me while I
quote myself: [1]
"And I think a mixin it's the best way of doing what you want:
@InjectContainer the Grid, use Grid.getGridDataSource(),
Grid.getDataModel() (to get the BeanModel), maybe
Grid.getCurrentPage(), create an EventLink and return a StreamResponse
in its handler method. Take a look at the Autocomplete mixin source
for inspiration. No need for subclassing here."
Another solution: you could bet the MarkupWriter and read the table
cells's content from that.
[1] If you didn't get the reference, take a look at
http://www.brainyquote.com/quotes/authors/m/murray_walker.html and
http://en.wikipedia.org/wiki/Murray_Walker
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]