You need to sign in to do that
Don't have an account?

Parameter always showing as Null in controller
I am trying to pass a value from a VF form into my controller, however the parameter is always staying as Null.
VF Code:
<apex:repeat value="{!ProdCVSiteInfo}" var="p">
<apex:commandButton value="Add" action="{!addProd}" style="vertical-align: top; padding:3px;">
<apex:param name="selectedProducts" value="{!p.Id}" assignTo="{!selectedProducts}"/>
</apex:commandButton>
</apex:repeat>
Controller
public String selectedProducts {
get;
set {selectedProducts = value;}
}
Where am I going wrong as i have done this previously and the code looks the same, can't seem to see the error.
VF Code:
<apex:repeat value="{!ProdCVSiteInfo}" var="p">
<apex:commandButton value="Add" action="{!addProd}" style="vertical-align: top; padding:3px;">
<apex:param name="selectedProducts" value="{!p.Id}" assignTo="{!selectedProducts}"/>
</apex:commandButton>
</apex:repeat>
Controller
public String selectedProducts {
get;
set {selectedProducts = value;}
}
Where am I going wrong as i have done this previously and the code looks the same, can't seem to see the error.


This help? https://success.salesforce.com/ideaView?id=08730000000YcV8AAK