Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>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:</p> <pre><code> $('.menuButton a').click(function() { var target = this.href + '&amp;reportStartDate=' + $('#reportStartDate').val(); window.location.href = target; return false; }); </code></pre> <p>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:</p> <ol> <li>Create a new taglib in your project. Give it <code>namespace = 'export'</code>, so it can override the plugin's tags. Copy the <code>formats</code> tag from <code>ExportTagLib</code> to your new taglib.</li> <li>Change the <code>&lt;a&gt;</code> tag to a submit button: <code>input(type: 'submit', name: 'format', value: format)</code></li> <li>If you want graphic buttons, use this instead: <code>input(type: 'image', name: 'format', value: format, src: g.resource(plugin: 'export', dir: 'images/skin', file: format + '.png'))</code></li> <li>You'll now need a <code>&lt;form&gt;</code> tag around your <code>&lt;export:formats&gt;</code> tag in your GSP.</li> </ol> <p>You won't be able to use <code>params.extension</code> in your controller anymore, but it's not hard to figure out the file extension from the format.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload