I have a VisualForce page that should pass the selected the value to the controller to update the record. See code below.
<apex:inputField value="{!l2.Status__c}">
<apex:actionSupport event="onchange" reRender="newstatus" action="{!saveChanges}" status="myStatus">
<apex:param name="statusId" value="{!l2.id}" assignTo="{!cid}"/>
<apex:param name="status" value="{!l2.Status__c}" assignTo="{!l1}"/>
</apex:actionSupport>
</apex:inputField>
When the value in inputField for {!l2.Status__c} is updated, it should pass the new value to the controller and assign to {!l1} in the controller. However, it doesn't work. If I use something such as <apex:param name="status" value="Test" assignTo="{!l1}"/>
, it does pass the "Test" value to the controller and the record is update with the the value of "Test". But I cannot seem to get the user's selected value in {!l2.Status__c} to update in the record.