Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5999927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:37:15+00:00 2026-05-23T00:37:15+00:00

I have installed the grails export plugin. It has an element export:formats which takes

  • 0

I have installed the grails export plugin. It has an element export:formats which takes a params value as attribute. I want to know how to set values from other elements onto this params attribute so that it is available to my controller action.

<div id="exportDetail">
     <g:select name="reportType" from="${['Daily', 'Weekly Hour', 'Weekly Day']}" ></g:select><br/>
     <g:datePicker name="reportStartDate" precision="hour"></g:datePicker><br/>
     <g:datePicker name="reportEndDate" precision="hour"></g:datePicker><br/>
     <export:formats action="exportRollup" formats="['csv', 'excel', 'ods', 'pdf', 'rtf', 'xml']" params="[**how to pass select, datepicker stuff here to controller**]"/>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:37:16+00:00Added an answer on May 23, 2026 at 12:37 am

    The params you give to the taglib will only affect the link rendered by Grails. If you want the link to contain params that change after page rendering, such as the values selected by the datepickers, then you need to use Javascript. Here’s a rough example:

     $('.menuButton a').click(function() {
         var target = this.href + '&reportStartDate=' + $('#reportStartDate').val();
         window.location.href = target;
         return false;
     });
    

    Ideally, your export buttons would submit a form containing the datepickers, and you would not need to use Javascript. You would have to write your own formats taglib to do that. This’ll get you started:

    1. Create a new taglib in your project. Give it namespace = 'export', so it can override the plugin’s tags. Copy the formats tag from ExportTagLib to your new taglib.
    2. Change the <a> tag to a submit button: input(type: 'submit', name: 'format', value: format)
    3. If you want graphic buttons, use this instead: input(type: 'image', name: 'format', value: format, src: g.resource(plugin: 'export', dir: 'images/skin', file: format + '.png'))
    4. You’ll now need a <form> tag around your <export:formats> tag in your GSP.

    You won’t be able to use params.extension in your controller anymore, but it’s not hard to figure out the file extension from the format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed spring-security-core in a grails project, but for some reason, IDEA didn't
I have a grails 1.2 app and I want to use declarative security in
I have installed and setup RubyCAS-Server and RubyCAS-Client on my machine. Login works perfectly
I have installed CherryPy 3.1.0,. Here is what happens when I try to run
I have installed Delphi Prism and XNA Game Studio 3.0. I have managed to
I have installed Visual Studio 2008 and patch it with SP1. However, I cannot
I have installed Xperf performance analyzer from Windows SDK and captured a trace as
I have installed: Visual C# 2008 Express Visual Web Developer 2008 Express Visual Studio
I have installed pylons based application from egg, so it sits somewhere under /usr/lib/python2.5/site-packages.
I have IIS 5.1 installed on Windows XP Pro SP2. Besides I have installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.