Monday, July 7, 2014

Passing parameters with Command Link

Passing parameters with Command Link

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:commandLink id="commandLink" action="{!displayName}" value="Show my name">
 <apex:param name="Name" value="myName"/> 
<br/> My name: {!name} 

Apex Class:

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


Post a Comment

| ,