Fix [ 1881480 ] Navigation problem between tabs

This commit is contained in:
Carlos Ruiz 2008-01-28 23:46:16 +00:00
parent 8e67bce559
commit 7ca3ef5043
2 changed files with 33 additions and 1 deletions

View File

@ -1162,6 +1162,29 @@ public class GridField
// m_propertyChangeListeners.firePropertyChange(PROPERTY, s_oldValue, null); // m_propertyChangeListeners.firePropertyChange(PROPERTY, s_oldValue, null);
} // setValue } // setValue
/**
* Set Value to null.
* <p>
* Do update context - called from GridTab.setCurrentRow
* Send Bean PropertyChange if there is a change
*/
public void setValueAndUpdateContext ()
{
// log.fine(ColumnName + "=" + newValue);
if (m_valueNoFire) // set the old value
m_oldValue = m_value;
m_value = null;
m_inserting = false;
m_error = false; // reset error
// [ 1881480 ] Navigation problem between tabs
Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName, (String) m_value);
// Does not fire, if same value
m_propertyChangeListeners.firePropertyChange(PROPERTY, m_oldValue, m_value);
// m_propertyChangeListeners.firePropertyChange(PROPERTY, s_oldValue, null);
} // setValue
/** /**
* Set Value. * Set Value.
* <p> * <p>

View File

@ -2190,7 +2190,16 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
// Object value = null; // Object value = null;
// if (mField.isKey() || mField.isParent() || mField.getColumnName().equals(m_linkColumnName)) // if (mField.isKey() || mField.isParent() || mField.getColumnName().equals(m_linkColumnName))
// value = mField.getDefault(); // value = mField.getDefault();
mField.setValue();
// CarlosRuiz - globalqss [ 1881480 ] Navigation problem between tabs
// the implementation of linking with window context variables is very weak
// you must be careful when defining a column in a detail tab with a field
// with the same column name as some of the links of the tabs above
// this can cause bad behavior of linking
if (mField.getColumnName().equals(m_linkColumnName))
mField.setValue();
else
mField.setValueAndUpdateContext();
} }
} }
loadDependentInfo(); loadDependentInfo();