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

Error: <apex:actionFunction> may not be used within an iterable component.

I am trying to send the input field value to the controller class from VF page and getting error inside the action funciton method :


Here I want to pass three parameters to the controller class :

prodcnt, dealcnt and obj.dsObj.NAS_QC__c ... i am getting the error :


Error: <apex:actionFunction> may not be used within an iterable component. You can use <apex:param> to define parameters for the function and pass iteration-specific values via the parameters.




<apex:variable var="prodcnt" value="{!0}" />  // To the get the row number of the product table
<apex:pageBlockTable value="{!selectedProducts}" var="product" id="dealSplitsPBTable">
<apex:column >
<div class="columnHeaderBox">
{!product.product.ProductCode}&nbsp; - &nbsp; {!product.product.Name}
<apex:variable var="dealcnt" value="{!0}" /> // To get the row number of the deal table
<apex:pageBlockTable value="{!product.dealSplits}" var="obj">

<apex:column headerValue="Delete?">
<apex:inputcheckbox value="{!obj.isSelected}" rendered="{!NOT(obj.isSummaryRecord)}"/>

<apex:column headerValue="QC/DM Name">
<apex:inputField value="{!obj.dsObj.NAS_QC__c}" onchange="ChangeTheManager(this, prodcnt, dealcnt);" rendered="{!NOT(obj.isSummaryRecord) && NOT(obj.isFirstRecord)}"/>
<apex:outputLabel value="" style="text-align:right; font-weight: bold;" rendered="{!obj.isSummaryRecord}"/>
<apex:OutputField value="{!obj.dsObj.NAS_QC__c}" rendered="{!NOT(obj.isSummaryRecord)&& (obj.isFirstRecord)}"/>
<apex:actionFunction name ="setManager" action ="{!selectManager}" rerender = "dealSplitsPBTable">
<apex:param value = "{!obj.dsObj.NAS_QC__c}" assignTo = "{!currentUserId}" />
<apex:param value = "{!prodcnt}" assignTo = "{!currentProdIndex}" />
<apex:param value = "{!dealcnt}" assignTo = "{!currentDealIndex}" />




U CAN refere the foloowing values for passing through Action function.