{
_LOG.finest("rowData is null at rowIndex:"+getRowIndex()+
" and currencyKey:"+getRowKey());
}
ComponentContextManager compCtxMgr = null;
if (!_inSuspendOrResume)
{
compCtxMgr = RequestContext.getCurrentInstance().getComponentContextManager();
ComponentContextChange change = compCtxMgr.peekChange();
if (change instanceof CollectionComponentChange &&
((CollectionComponentChange)change)._component == this)
{
// Remove the component context change if one was added
compCtxMgr.popChange();
}
}
InternalState iState = _getInternalState(true);
if (rowData == null)
{
// if the rowData is null, then we will restore the EL 'var' variable
// to be whatever the value was, before this component started rendering:
if (iState._prevVarValue != _NULL)
{
_setELVar(iState._var, iState._prevVarValue);
iState._prevVarValue = _NULL;
}
if (iState._prevVarStatus != _NULL)
{
_setELVar(iState._varStatus, iState._prevVarStatus);
iState._prevVarStatus = _NULL;
}
}
else
{
if (iState._var != null)
{
Object oldData = _setELVar(iState._var, rowData);
if (iState._prevVarValue == _NULL)
iState._prevVarValue = oldData;
}
// varStatus is not set per row. It is only set once.
// if _PrevVarStatus has not been assigned, then we have not set the
// varStatus yet:
if ((iState._varStatus != null) && (iState._prevVarStatus == _NULL))
{
Map<String, Object> varStatusMap = createVarStatusMap();
iState._prevVarStatus = _setELVar(iState._varStatus, varStatusMap);
}
// If there is a current row, push a component change so that we may clear the
// var and var status should a visit tree occur
if (!_inSuspendOrResume)
{
compCtxMgr.pushChange(new CollectionComponentChange(this));
}
}
_restoreStampState();