protected void cleanupStaleContexts ( final Set < ? > rowIds ) { RepeaterModel model = getOrCreateComponentModel ( ) ; if ( model . rowContextMap != null ) { for ( Iterator < Map . Entry < Object , SubUIContext > > i = model . rowContextMap . entrySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { Map . Entry < Object , SubUIContext > entry = i . next ( ) ; Object rowId = entry . getKey ( ) ; if ( ! rowIds . contains ( rowId ) ) { i . remove ( ) ; } } if ( model . rowContextMap . isEmpty ( ) ) { model . rowContextMap = null ; } } }
Removes any stale contexts from the row context map .