onOpen

This method is called when the view is opened, i.e. after construction. In most of the cases you can place all the initialization code into the constructor.