update document title when view changes