put the view before getting the document