本文整理汇总了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
}