[JBIDE-13250] making sure correct connection is selected

Made sure the correct connection is looked up. Cleaned and refactored
the whole wizard page.