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
jadenjaden 

Return a value to class from pageblocktable

Hi,

 

I have a pageblock table with some rows displayed.  The user logged on picks one of the rows and I need the id which is a hidden column returned to my class. 

 

This is what I have on the pageblocktable for this using the command link with a Param, what I get back is the id from the first row no matter which row I click on. 

 <apex:column headerValue="Sel"> 
      <apex:commandLink action="{!assign}" value="Sel"> >  
        <apex:param name="tobeassignid" value="{!pitem.userdata.id}" assignTo="{!AssignID}" /> 
       </apex:commandLink> 
</apex:column> 

 Any help greatly appreciated. Thank you.

 

Best Answer chosen by Admin (Salesforce Developers) 
jadenjaden

I took a break, looked at it again and found the issues,

<apex:param name="tobeassignid"   

 

this needed to be

<apex:param name="AssignId"