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
gopikrishnagopikrishna 

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

 

Navatar_DbSupNavatar_DbSup

---- 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. 

lingannalinganna

 

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.