// some methods to discover it programatically.
if (StateCacheUtils.isMyFacesResponseStateManager(rsm))
{
if (StateCacheUtils.getMyFacesResponseStateManager(rsm).isWriteStateAfterRenderViewRequired(context))
{
stateWriter.writingState();
}
else
{
stateWriter.writingStateWithoutWrapper();
}