IDEMPIERE-119 Implement Export to Excel For Account Viewer
thanks to Nicolas (nmicoud)
This commit is contained in:
parent
ef402a5f08
commit
9d7988ed89
|
@ -499,6 +499,7 @@ public class WAcctViewer extends Window implements EventListener
|
||||||
bExport.setImage("/images/Export16.png");
|
bExport.setImage("/images/Export16.png");
|
||||||
bExport.setTooltiptext(Msg.getMsg(Env.getCtx(), "Export"));
|
bExport.setTooltiptext(Msg.getMsg(Env.getCtx(), "Export"));
|
||||||
bExport.addEventListener(Events.ON_CLICK, this);
|
bExport.addEventListener(Events.ON_CLICK, this);
|
||||||
|
bExport.setVisible(false);
|
||||||
|
|
||||||
southPanel.setWidth("100%");
|
southPanel.setWidth("100%");
|
||||||
southPanel.setWidths("2%, 12%, 82%, 2%, 2%");
|
southPanel.setWidths("2%, 12%, 82%, 2%, 2%");
|
||||||
|
@ -710,7 +711,7 @@ public class WAcctViewer extends Window implements EventListener
|
||||||
boolean visible = m_data.documentQuery && tabResult.isSelected();
|
boolean visible = m_data.documentQuery && tabResult.isSelected();
|
||||||
|
|
||||||
bRePost.setVisible(visible);
|
bRePost.setVisible(visible);
|
||||||
bExport.setVisible(visible);
|
bExport.setVisible(tabResult.isSelected());
|
||||||
|
|
||||||
if (Ini.isPropertyBool(Ini.P_SHOW_ADVANCED))
|
if (Ini.isPropertyBool(Ini.P_SHOW_ADVANCED))
|
||||||
forcePost.setVisible(visible);
|
forcePost.setVisible(visible);
|
||||||
|
@ -763,7 +764,7 @@ public class WAcctViewer extends Window implements EventListener
|
||||||
RModelExcelExporter exporter = new RModelExcelExporter(m_rmodel);
|
RModelExcelExporter exporter = new RModelExcelExporter(m_rmodel);
|
||||||
File file;
|
File file;
|
||||||
try {
|
try {
|
||||||
file = File.createTempFile(getTitle(), ".xsl");
|
file = File.createTempFile(getTitle(), ".xls");
|
||||||
exporter.export(file, Env.getLanguage(Env.getCtx()));
|
exporter.export(file, Env.getLanguage(Env.getCtx()));
|
||||||
Filedownload.save(file, "application/vnd.ms-excel");
|
Filedownload.save(file, "application/vnd.ms-excel");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue