You need to sign in to do that
Don't have an account?
Parameters are not passing into controller with actionsupport
i am unable to pass parameters into controller from actionsupport
<apex:page controller="paramtest">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!acclist}" var="a">
<apex:column ><apex:inputCheckbox ><apex:actionSupport action="{!nothing}" event="onchange"><apex:param value="{!a.id}" name="{!bee}" assignTo="{!bee}"/></apex:actionSupport></apex:inputCheckbox></apex:column>
<apex:column ><apex:outputText value="{!a.name}"></apex:outputText></apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
public with sharing class paramtest {
public PageReference nothing() {
string beenn= ApexPages.currentPage().getParameters().get('bee');
system.debug('from constructor '+beenn);
return null;
}
public list<account> acclist { get; set; }
public string bee {get;set;}
public paramtest(){
acclist=[select id,name from account];
}
}
<apex:page controller="paramtest">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!acclist}" var="a">
<apex:column ><apex:inputCheckbox ><apex:actionSupport action="{!nothing}" event="onchange"><apex:param value="{!a.id}" name="{!bee}" assignTo="{!bee}"/></apex:actionSupport></apex:inputCheckbox></apex:column>
<apex:column ><apex:outputText value="{!a.name}"></apex:outputText></apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
public with sharing class paramtest {
public PageReference nothing() {
string beenn= ApexPages.currentPage().getParameters().get('bee');
system.debug('from constructor '+beenn);
return null;
}
public list<account> acclist { get; set; }
public string bee {get;set;}
public paramtest(){
acclist=[select id,name from account];
}
}
I have modified your code a bit, and its working fine.
Apex:
VF:
Select it as Best Answer, if it solves your problem.