Added applyTemplate method to BaseView.