Use viewfactory in TOCView.

This way TOC does not need to reimplement everything (e.g., annotated text
support, labelled headings.)