Add getSelectedValue method.