You need to sign in to do that
Don't have an account?
Seraph
Return Row Value when Clicking Outputlink
I have a table and a controller
ex.
Gadget Action
Smartphone Edit
Watch Edit
Camera Edit
If I click Edit in the 2nd row, I would return Smartphone in a System.Debug statement.
How could I do this?
<apex:page sidebar="false" controller="DisplayStatus"> <apex:pageBlock title="Gadget (Gadget__c)"> <apex:pageBlockTable value="{!gadgetlist}" var="gadget"> <apex:column headerValue="Gadget" value="{!gadget.Name}"/> <apex:column headerValue="Action"> <apex:outputlink>Edit</apex:outputlink> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex>If I click Edit it will return the value of its corresponding row (gadget.Name) in a System.debug.
ex.
Gadget Action
Smartphone Edit
Watch Edit
Camera Edit
If I click Edit in the 2nd row, I would return Smartphone in a System.Debug statement.
How could I do this?
Try following code
and you can get the Gadget Name at controller using following code:
If its helps, please mark as best answer so it will help to other who will serve same problem.
Thanks!
All Answers
Here is an example have a look and let me know
http://blog.jeffdouglas.com/2010/03/03/passing-parameters-with-a-commandlink/
Try following code
and you can get the Gadget Name at controller using following code:
If its helps, please mark as best answer so it will help to other who will serve same problem.
Thanks!
for those who wanna try this, here is my full working codes
visualforce page controller hope this helps someone!!!