Smarter way of figuring out viewClass. Just use reflection on the 'view' property.