when attached, set the view instance property 'attached' to true