IDEMPIERE-133

use most specific version of MSysConfig.getValue
to get setting for current client and org
or system setting if exists
or default
This commit is contained in:
Dirk Niemeyer 2012-02-05 12:52:42 -05:00
parent de5c397b3c
commit 92eb073741
1 changed files with 5 additions and 3 deletions

View File

@ -200,8 +200,9 @@ public class ZkReportViewer extends Window implements EventListener, ITabOnClose
//set default type
String type = m_reportEngine.getPrintFormat().isForm()
? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE")
: MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE");
// a42niem - provide explicit default and check on client/org specifics
? MSysConfig.getValue("ZK_REPORT_FORM_OUTPUT_TYPE","PDF",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx))
: MSysConfig.getValue("ZK_REPORT_TABLE_OUTPUT_TYPE","HTML",Env.getAD_Client_ID(m_ctx),Env.getAD_Org_ID(m_ctx));
if ("PDF".equals(type))
previewType.setSelectedIndex(0);
@ -210,7 +211,8 @@ public class ZkReportViewer extends Window implements EventListener, ITabOnClose
else if ("XLS".equals(type))
previewType.setSelectedIndex(2);
else
previewType.setSelectedIndex(0); //fallback to PDF
// XXX - provide hint if unexpected value
previewType.setSelectedIndex(0); //fall back to PDF
labelDrill.setValue(Msg.getMsg(Env.getCtx(), "Drill") + ": ");