added code to get id and list of selected values when parameter changes