Within <apex:outputText>, there’s support for the <apex:param> tag to match the syntax of the MessageFormat class in Java.
<!-- For this example to render fully, associate the page with a valid contact record in the URL. For example: https://Salesforce_instance/apex/myPage?id=001D000000IRt53 --> <apex:page standardController="Contact"> <apex:outputLink value="http://google.com/search"> Search Google <apex:param name="q" value="{!contact.name}"/> </apex:outputLink> </apex:page>
Attribute Name | Attribute Type | Description | Required? | API Version | Access |
---|---|---|---|---|---|
assignTo | Object | A setter method that assigns the value of this param to a variable in the associated Visualforce controller. If this attribute is used, getter and setter methods, or a property with get and set values, must be defined. | 10.0 | global | |
id | String | An identifier that allows the param component to be referenced by other components in the page. | 10.0 | global | |
name | String | The key for this parameter, for example, name="Location". | 10.0 | global | |
value | Object | The data associated with this parameter, for example, value="San Francisco, CA". The value attribute must be set to a string, number, or boolean value.
Note that value is the only required attribute for a param component because it’s all that’s needed when performing a string replacement. For example, if you use "My {0}" as the value of an outputText component and then include a param in the body of the outputText component, the value of the param tag replaces the {0} placeholder in the output text string. |
Yes | 10.0 | global |