@Override public void initContextData(Session session, Context uiSharedContext) { selectedMethod = uiSharedContext.getSessionManagementMethod(); if (log.isDebugEnabled()) log.debug( "Initializing configuration panel for session management method: " + selectedMethod + " for context " + uiSharedContext.getName()); // If something was already configured, find the type and set the UI accordingly if (selectedMethod != null) { // If the proper type is already selected, just rebind the data if (shownMethodType != null && shownMethodType.isTypeForMethod(selectedMethod)) { if (shownMethodType.hasOptionsPanel()) shownConfigPanel.bindMethod(selectedMethod); return; } // Select what needs to be selected for (SessionManagementMethodType type : extension.getSessionManagementMethodTypes()) if (type.isTypeForMethod(selectedMethod)) { // Selecting the type here will also force the selection listener to run and // change the config panel accordingly getSessionManagementMethodsComboBox().setSelectedItem(type); break; } } }