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

how to access visualforce page param values in controller
HI all
here I am using param tag for accessing value but i am not getting the value in control. in developer console its showing null
<apex:pageBlock >
<apex:pageblockTable value="{!wrap}" var="w">
<apex:column headerValue="accountname" value="{!w.aname}"/>
<apex:column headerValue="no.contacts" >
<apex:commandLink value="{!w.con}" action="{!showcon}">
<apex:param name="abc" value="{!w.name}" assignedto="{!pname1}"/>
</apex:commandlink>
</apex:column>
</apex:pageblocktable>
</apex:pageblock>
cnotroller
public string pname1{set;get;}
public void showcon(){
system.debug('@@@@@@@@@@@@@@@@@@@'+pname1);
//string pname=ApexPages.currentPage().getParameters().get('abc') ;
//system.debug('$$$$$$$$$$$$$$$$$$$$$$'+pname);
}
thanks
---- vfp age-----------
<apex:pageBlock >
<apex:pageblockTable value="{!wrap}" var="w">
<apex:column headerValue="accountname" value="{!w.aname}"/>
<apex:column headerValue="no.contacts" >
<apex:commandLink value="{!w.con}" action="{!showcon}">
<apex:param name="abc" value="{!w.name}" assignTo="{!pname1}"/>
</apex:commandlink>
</apex:column>
</apex:pageblocktable>
</apex:pageblock>
---------- apex Controller---------------
public string pname1{set;get;}
public void showcon(){
system.debug('@@@@@@@@@@@@@@@@@@@'+pname1);
//string pname=ApexPages.currentPage().getParameters().get('abc') ;
//system.debug('$$$$$$$$$$$$$$$$$$$$$$'+pname);
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
when i click command link the {!w.aname} value i have to access in controller ,but there i am getting
system.debug('@@@@@@@@@@@@@@@@@@@'+pname1) value is null.