Instead of doing this (which is prone to getting out of date with the .UI file) you could use the widget's name directly (and name the page widgets page1Choose, etc.) and then just call setCurrentWidget(page1Choose);