Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. def filter = {
  2. if(!params.max) params.max = 10
  3. if(params?.format && params.format != "html"){
  4. response.contentType = grailsApplication.config.grails.mime.types[params.format]
  5. response.setHeader("Content-disposition", "attachment; filename=books.${params.extension}")
  6.  
  7. exportService.export(params.format, response.outputStream,filterPaneService.filter( params, Book ), [:], [:])
  8. }
  9. render( view:'list',
  10. model:[ bookInstanceList: filterPaneService.filter( params, Book ),
  11. bookInstanceTotal: filterPaneService.count( params, Book ),
  12. filterParams: FilterPaneUtils.extractFilterParams(params),
  13. params:params ] )
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement