+ Start a Discussion
yogesh pTILyogesh pTIL 

what is the use name and value attributes in<apex:param>

Best Answer chosen by yogesh pTIL
Amit Chaudhary 8Amit Chaudhary 8

Please check below post for more information
1) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_param.htm
2) http://blog.jeffdouglas.com/2010/03/04/passing-parameters-with-a-commandbutton/
3) http://blog.jeffdouglas.com/2010/03/03/passing-parameters-with-a-commandlink/


apex:param
A parameter for the parent component. The <apex:param> component can only be a child of the following components:
<apex:actionFunction>
<apex:actionSupport>
<apex:commandLink>
<apex:outputLink>
<apex:outputText>
<flow:interview>

apex:outputLink Example
<!-- 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>
User-added image


Let us know if this will help you
 

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Yogesh,

If you use value you can set the value to the query string param name
like
<apex:param name="val" value"1234"/>
from this, you can access this value in the controller using
apexpages.currentpage().getparameters.get('val')
Name is the attribute which specifies the key for this parameter.For Ex:
name="Location".
May I suggest you please check with below link for more information. Please mark this as solved if the information helps.

Regards,
Nagendra.
Amit Chaudhary 8Amit Chaudhary 8

Please check below post for more information
1) https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_param.htm
2) http://blog.jeffdouglas.com/2010/03/04/passing-parameters-with-a-commandbutton/
3) http://blog.jeffdouglas.com/2010/03/03/passing-parameters-with-a-commandlink/


apex:param
A parameter for the parent component. The <apex:param> component can only be a child of the following components:
<apex:actionFunction>
<apex:actionSupport>
<apex:commandLink>
<apex:outputLink>
<apex:outputText>
<flow:interview>

apex:outputLink Example
<!-- 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>
User-added image


Let us know if this will help you
 
This was selected as the best answer