create a command link and pass arguements. In the apex class you can get the parameters and use the value in your code.

Visual Force Page:

<apex:page controller="showCammand"> <apex:form> <apex:commandLink id="commandLink" action="{!displayName}" value="Show my name"> <apex:param name="Name" value="myName"/> </apex:commandLink> <br/> My name: {!name} </apex:form> </apex:page>
 
Apex Class:
public class showCammand()
{
public String name {get; set;}
public void displayName()
{
name = ApexPages.CurrentPage().getParameters().get('Name');
}
}

Written by 

Salesforce MVP | Lightning Champion | 16x Salesforce Certified | Application Architect | 6x Trailhead Ranger | Techforce Services | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *

*

create a command link and pass arguements. In the apex class you can get the parameters and use the value in your code.

Visual Force Page:








My name: {!name}

 
Apex Class:
public class showCammand()
{
public String name {get; set;}
public void displayName()
{
name = ApexPages.CurrentPage().getParameters().get('Name');
}
}

Written by 

Salesforce MVP | Lightning Champion | 16x Salesforce Certified | Application Architect | 6x Trailhead Ranger | Techforce Services | Australia

Leave a Reply

Your email address will not be published. Required fields are marked *