1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.lookup;
17
18 import java.io.IOException;
19 import java.io.Writer;
20
21 import javax.servlet.jsp.JspException;
22
23 import org.displaytag.export.XmlView;
24 import org.displaytag.model.TableModel;
25 import org.kuali.rice.kns.lookup.ExportViewHelper;
26 import org.kuali.rice.krad.util.KRADConstants;
27
28
29
30
31
32
33 public class CustomXmlExportView extends XmlView {
34
35 private ExportViewHelper helper;
36
37 @Override
38 public void setParameters(TableModel tableModel, boolean exportFullList, boolean includeHeader, boolean decorateValues) {
39 this.helper = new ExportViewHelper(tableModel);
40 super.setParameters(tableModel, exportFullList, includeHeader, decorateValues);
41 }
42
43 @Override
44 public void doExport(Writer writer) throws IOException, JspException {
45 if (!helper.attemptCustomExport(writer, KRADConstants.XML_FORMAT)) {
46 super.doExport(writer);
47 }
48 }
49
50 }