}
private void jFreeChartExport()
{
try {
final ExportJFreeChart exportJFreeChart = (ExportJFreeChart) groovyResult.getResult();
final StringBuilder sb = new StringBuilder();
sb.append("pf_chart_");
sb.append(DateHelper.getTimestampAsFilenameSuffix(new Date()));
final Response response = getResponse();
final String extension = exportJFreeChart.write(response.getOutputStream());
sb.append('.').append(extension);
final String filename = sb.toString();
final int width = exportJFreeChart.getWidth();
final int height = exportJFreeChart.getHeight();
final JFreeChartImage image = new JFreeChartImage("image", exportJFreeChart.getJFreeChart(), exportJFreeChart.getImageType(), width,
height);
image.add(AttributeModifier.replace("width", String.valueOf(width)));
image.add(AttributeModifier.replace("height", String.valueOf(height)));
imageResultContainer.removeAll();
imageResultContainer.add(image).setVisible(true);