added setViewData() method to be able to set view data programaticly before calling the generator