1003403 Detail tab should not update window context. IDEMPIERE-1485
This commit is contained in:
parent
07c83ff7fd
commit
d7f80a1472
|
@ -1523,7 +1523,7 @@ public class GridField
|
|||
else if (m_value instanceof Boolean)
|
||||
{
|
||||
backupValue(); // teo_sarca [ 1699826 ]
|
||||
if (!isParentTabField())
|
||||
if (!isParentTabField() && isUpdateWindowContext())
|
||||
{
|
||||
Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName,
|
||||
((Boolean)m_value).booleanValue());
|
||||
|
@ -1534,7 +1534,7 @@ public class GridField
|
|||
else if (m_value instanceof Timestamp)
|
||||
{
|
||||
backupValue(); // teo_sarca [ 1699826 ]
|
||||
if (!isParentTabField())
|
||||
if (!isParentTabField() && isUpdateWindowContext())
|
||||
{
|
||||
Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName, (Timestamp)m_value);
|
||||
}
|
||||
|
@ -1554,7 +1554,7 @@ public class GridField
|
|||
else
|
||||
{
|
||||
backupValue(); // teo_sarca [ 1699826 ]
|
||||
if (!isParentTabField())
|
||||
if (!isParentTabField() && isUpdateWindowContext())
|
||||
{
|
||||
Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName,
|
||||
m_value==null ? null : m_value.toString());
|
||||
|
@ -2060,6 +2060,14 @@ public class GridField
|
|||
return isParentTabField(m_vo.ColumnName);
|
||||
}
|
||||
|
||||
private boolean isUpdateWindowContext()
|
||||
{
|
||||
if (getGridTab() != null)
|
||||
return getGridTab().isUpdateWindowContext();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*IDEMPIERE-358*/
|
||||
|
||||
public int getXPosition()
|
||||
|
|
|
@ -2708,6 +2708,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
private List<String> activeCallouts = new ArrayList<String>();
|
||||
private List<Callout> activeCalloutInstance = new ArrayList<Callout>();
|
||||
|
||||
private boolean m_updateWindowContext = true;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return list of active call out for this tab
|
||||
|
@ -3212,4 +3214,14 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
|||
public boolean isNew() {
|
||||
return isOpen() && getCurrentRow() >= 0 && getCurrentRow() == m_mTable.getNewRow();
|
||||
}
|
||||
|
||||
public boolean isUpdateWindowContext()
|
||||
{
|
||||
return m_updateWindowContext ;
|
||||
}
|
||||
|
||||
public void setUpdateWindowContext(boolean updateWindowContext)
|
||||
{
|
||||
m_updateWindowContext = updateWindowContext;
|
||||
}
|
||||
} // GridTab
|
||||
|
|
|
@ -533,6 +533,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
// Query first tab
|
||||
if (tabIndex == 0)
|
||||
{
|
||||
gTab.setUpdateWindowContext(true);
|
||||
m_queryInitiating = true;
|
||||
getComponent().setVisible(false);
|
||||
initialQuery(query, gTab, new Callback<MQuery>() {
|
||||
|
@ -565,6 +566,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
gTab.setUpdateWindowContext(false);
|
||||
}
|
||||
|
||||
if (gTab.isSortTab())
|
||||
{
|
||||
|
@ -1149,8 +1154,13 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
IADTabpanel newTabpanel = adTabbox.getSelectedTabpanel();
|
||||
|
||||
//toggle window context update
|
||||
if (newTabpanel.getGridTab() != null)
|
||||
newTabpanel.getGridTab().setUpdateWindowContext(true);
|
||||
if (oldTabIndex > newTabIndex && oldTabpanel.getGridTab() != null)
|
||||
oldTabpanel.getGridTab().setUpdateWindowContext(false);
|
||||
|
||||
boolean activated = newTabpanel.isActivated();
|
||||
if (oldTabpanel != null)
|
||||
|
|
Loading…
Reference in New Issue