Skip to Content

TheBlogReaders.com

Salesforce.com, PHP, MySQL, Javascript, Ajax, Htacces

Passing parameters with Command Link

Be First!
by March 1, 2012 Uncategorized

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');
}
}

(465)

Previous
Next

Leave a Reply

Passing parameters with Command Link

Be First!
by February 9, 2012 APEX, Visual Force
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');
}
}

(26)

Previous
Next

Leave a Reply