GlobalFilters are not being applied to Exports
kdoig opened this issue · 7 comments
In EasyGrid 1.6.3, when exporting a table with a global filter applied, the entire table is exported not just the filtered table.
It's a bug. I will look into it.
Thanks
I wasn't able to replicate this bug .
Can you provide more details on your scenario?
Hi Tudor,
sorry its taken me a while to get back to you. Im using EasyGrid 1.6.3
The globalFilter is as follows:
// Applies for all records returned
//
globalFilterClosure
{
if ( params.id =~ /^\d+$/ )
{
long id = params.id as long
seqSample { eq( 'id', id ) }
}
order( 'reportable', 'desc' )
order( 'curated', 'desc' )
}
This filter is correctly applied when the grid is displayed but the export returns all records and memory gets exhausted.
I can manually apply a filter with the filterToolbar to get the export to honour the filter but I need it to happen automatically so the export matches what's displayed
in the screen grid.
Thanks for any help.
Regards,
Ken Doig
Bioinformatics, Cancer Research
Molecular Pathology Department
email: ken.doig@petermac.orgmailto:ken.doig@petermac.org
mob: 04 1122 5178
On 29/09/2014, at 5:21 AM, Tudor Malene wrote:
I wasn't able to replicate this bug .
Can you provide more details on your scenario?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/121#issuecomment-57096628.
This email (including any attachments or links) may contain
confidential and/or legally privileged information and is
intended only to be read or used by the addressee. If you
are not the intended addressee, any use, distribution,
disclosure or copying of this email is strictly
prohibited.
Confidentiality and legal privilege attached to this email
(including any attachments) are not waived or lost by
reason of its mistaken delivery to you.
If you have received this email in error, please delete it
and notify us immediately by telephone or email. Peter
MacCallum Cancer Centre provides no guarantee that this
transmission is free of virus or that it has not been
intercepted or altered and will not be liable for any delay
in its receipt.
Hi Ken,
It's the externalParams again.
They need to be passed to the export plugin tag.
This needs to be added to EasygridTaglib.exportButton:
attrs.params = GridUtils.externalParams(gridConfig)
, so that the id
parameter is available in the globalFilterClosure
Upgraded to 1.6.6 and added externalParams (['id']) to grid. Works like a charm, thanks very much Tudor.
Regards,
Ken Doig
Bioinformatics, Cancer Research
Molecular Pathology Department
email: ken.doig@petermac.orgmailto:ken.doig@petermac.org
mob: 04 1122 5178
On 05/10/2014, at 11:07 PM, Tudor Malene wrote:
Hi Ken,
It's the externalParams again.
They need to be passed to the export plugin tag.
This needs to be added to EasygridTaglib.exportButton:
attrs.params = GridUtils.externalParams(gridConfig), so that the id parameter is available in the globalFilterClosure
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/121#issuecomment-57934069.
This email (including any attachments or links) may contain
confidential and/or legally privileged information and is
intended only to be read or used by the addressee. If you
are not the intended addressee, any use, distribution,
disclosure or copying of this email is strictly
prohibited.
Confidentiality and legal privilege attached to this email
(including any attachments) are not waived or lost by
reason of its mistaken delivery to you.
If you have received this email in error, please delete it
and notify us immediately by telephone or email. Peter
MacCallum Cancer Centre provides no guarantee that this
transmission is free of virus or that it has not been
intercepted or altered and will not be liable for any delay
in its receipt.
Nice.
I'll need to do some more work on this externalParams functionality. It causes a lot of problems
Hi Tudor,
I wondered if there was any way to set the export_title and thus the extract file name dynamically?
I have a requirement to name the file differently according to how the grid has been filtered.
BTW the plugin is fantastic, great work.
Regards
Neil