本文整理匯總了Java中org.compiere.util.Env.setAutoCommit方法的典型用法代碼示例。如果您正苦於以下問題:Java Env.setAutoCommit方法的具體用法?Java Env.setAutoCommit怎麽用?Java Env.setAutoCommit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.compiere.util.Env
的用法示例。
在下文中一共展示了Env.setAutoCommit方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateContext
import org.compiere.util.Env; //導入方法依賴的package包/類
public void updateContext(final Properties ctx)
{
Env.setContext(ctx, "#ShowTrl", true);
Env.setContext(ctx, "#ShowAdvanced", true);
Env.setAutoCommit(ctx, isPropertyBool(P_AUTO_COMMIT));
Env.setAutoNew(ctx, isPropertyBool(P_AUTO_NEW));
}
示例2: dispose
import org.compiere.util.Env; //導入方法依賴的package包/類
/**
* Dispose
*/
public void dispose()
{
// ignore changes
m_disposing = true;
//
if (m_curAPanelTab != null)
{
m_curAPanelTab.unregisterPanel();
m_curAPanelTab = null;
}
// close panels
if (tabPanel != null)
{
tabPanel.dispose(this);
tabPanel = null;
}
// All Workbenches
if (m_mWorkbench != null)
{
for (int i = 0; i < m_mWorkbench.getWindowCount(); i++)
{
m_curWindowNo = m_mWorkbench.getWindowNo(i);
log.debug("disposing windowNo={}", m_curWindowNo);
Env.setAutoCommit(m_ctx, m_curWindowNo, false);
m_mWorkbench.dispose(i);
Env.clearWinContext(m_ctx, m_curWindowNo);
}
m_mWorkbench.dispose();
m_mWorkbench = null;
}
// MenuBar
if (menuBar != null)
{
menuBar.removeAll();
menuBar = null;
}
// ToolBar
if (toolBar != null)
{
toolBar.removeAll();
toolBar = null;
getInputMap(WHEN_IN_FOCUSED_WINDOW).clear();
}
// Current grid controller
// mainly, it shall be already disposed, but we do this for included tab case where tabPanels is null.
if (m_curGC != null)
{
m_curGC.removeDataStatusListener(this);
m_curGC.dispose();
m_curGC = null;
}
// Prepare GC
this.removeAll();
Services.get(IProcessEventSupport.class).removeListener(this); // metas: remove this instance a a listener
}