Added onAttach onDetach hook to ViewImpl

ok makes sense +1 on Julien's suggestion.