Is there any way to pass the current value of a picklist to a controller via apex:param? I have my apex:param inside of a action:support onChange so when the user selects a picklist option it passes that value to the controller method. I'm able to pass the ID with {!$Component.FIELDID} but is there any way to pass the value for example {!$Component.FIELDID.value}? I'm unable to find much documentation on $Component.
I guess the alternative would be to use an actionFunction? I'm going to try that next but wanted to know if this way was possible.
Thanks!
EDIT : snippet (the inputField is a picklist)
<apex:inputField value="{!thisContact.Degree_Level__c}" id="degreeLevel">
<apex:actionSupport event="onchange"
action="{!updateDegreeSelected}"
rerender="program"
immediate="true">
<apex:param name="degreeSelected" assignTo="{!degreeSelected}" value="{!$Component.degreeLevel}"/>
</apex:actionSupport>
</apex:inputField>
Best Answer
Unless I'm missing the point of what you're trying to do, the currently selected value is accessible in the field that is bound to your inputField's value attribute.
EDIT: Removed immediate attribute. Default is false.
So it should be accessible to the controller through thisContact.Degree_Level__c.
So somewhere in your controller you have a property called thisContaact and a method called updateDegreeSelected that look something like this: