You need to sign in to do that
Don't have an account?
Venkata Sravan Kumar Bandari
I want to pass parameters from command link to controller how it is possible.......?
<apex:repeat value="{!pages}" var="page">
<apex:commandlink value="{!page}" action="{!displayPage}">
<apex:param value="page" name="number" assignTo="{!pageNumber}"/>
</apex:commandLink>
</apex:repeat>
Here i am displaying commandlinks 1 2 3 ......when i click on the link respective number will pass to controller..is it possible....?
Thanks in advance
<apex:commandlink value="{!page}" action="{!displayPage}">
<apex:param value="page" name="number" assignTo="{!pageNumber}"/>
</apex:commandLink>
</apex:repeat>
Here i am displaying commandlinks 1 2 3 ......when i click on the link respective number will pass to controller..is it possible....?
Thanks in advance
You need to use apex:actionfunction.
You can use below code for your page and controller.
Apex Page: Apex Class:
Thanks and Cheers,
Jigar
Yes its possible,
Like the sample below which i have used in my VF page.
VF page:
<apex:commandLink action="{!goEOLPage}" style="color:#c71444;text-decoration:none;" value="{!$Label.LinkPayLiability}"> <apex:param value="3" assignTo="{!eolSec}"/> <apex:param name="EndOfLease" value="EndOfLease" assignTo="{!RedirectPage}"/> </apex:commandLink>
On clicking the commandLink it sets the value. of the variable RedirectPage and Eol Sec in the controller.
Controller:
public string eolSec{get;set;}
public string RedirectPage {get;set;}
Thanks,
Gokul