function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SabrentSabrent 

actionFunction not setting the selectedValue

 

Any suggestions why this couls be happening?

Thanks!!!

 

 

 

 

<script>
	function updateStatus(selectedCode){  
	alert(" Testing 1 >>>>    "+selectedCode);   
	updateStatusActionFunction(selectedCode);
	alert("Testing 2 >>    "+selectedCode); 
	}
</script>

// Doesn't set the selectedCode as seen in the alert above
// as a result the class in the controller doesn't get invoked.. it doesn't even male it to the class.
<apex:actionFunction name="updateStatusActionFunction" action="{!showStdReqs}" rerender="stdrs,cdTrck"> <apex:param name="jobSelected" assignTo="{!jobSelected}" value="selectedCode"/> </apex:actionFunction> <apex:pageblockSection columns="2" title="CT" id="cdTrck"> <apex:pageBlockSectionItem > <apex:outputLabel value="Job Code" for="jc"/> <apex:outputPanel layout="block" styleClass="requiredInput"> <apex:outputPanel layout="block" styleClass="requiredBlock"></apex:outputPanel> <apex:inputField value="{!ctEmpl.Job_Code__c}" id="jc" onchange="updateStatus(this.value)"/> </apex:outputPanel> </apex:pageBlockSectionItem> ... </apex:pageblockSection> </apex:pageBlock> <apex:pageBlock title="New Requirements" > <apex:pageBlockTable value="{!stdReqs}" var="s" id="stdrs" width="100%" columns="2" columnsWidth="100px, 100px"> <apex:column headerValue="Requirement" value="{!s.Requirement__c}"/> <apex:column headerValue="Category" value="{!s.CT_Category__c}"/> </apex:pageBlockTable> </apex:pageBlock><br/> // CONTROLLER public String jobSelected { get; set; } public Pagereference showStdReqs(){ } }

 

crop1645crop1645

ROV, not sure if you omitted this but

 

An <apex:actionFunction> component must be a child of an <apex:form> component.

 I don;t see a form tag