Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Entire Records to display in exportToexcel

 
soma lingam
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


In my project i am using (Struts ,Hibernate, EJB, Oracle)


I need to display 15 records for a page i done it by pagination and Limiting the results at DAO level
For doing pagination i am using Display Tag so based on display tag i am
display 15 records BUT

now, i need to get all the records that are available in the DB when i click on ExportToExcel button which is used to display the entire records in excel

or if i select some of the records then those only need to display at exportToexcel

or any simple way to design so that
can anybody help me in this regards...

Thanks,
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just do your query as normal, and when the results come back, format them in a comma separated fashion. Then, send those to the client with the mime-type changed to text/xsl, or whatever the Excel mime-type is. It should be easy if your queries are already bringing back the information you need.

-Cameron McKenzie
 
soma lingam
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Cameron,

as the display tag i am using the object that i am passing to display to form by (Value Objects) like paginationvos for that the query i passed to get the maxresults as 15
setMaxResults(15) that is why i couldn't able to get all the records to drop it into exportToexcel any idea that i can drop to vo to form by specifying any query any example for this

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic