An answer that I got from the myfaces users mailing list:
viewRoot.getAttributes()
map could be used to persist the viewscoped values even after session destroys. Thus instead of storing values to viewRoot.getViewMap()
, store in the map returned by viewRoot.getAttributes()
. However care should to be taken to ensure that the stored values are serializable.