How do command buttons and command links differ when it comes to using <apex:param>
?
The param value is not being passed to the controller.
I have the following code in a Controller :
public pagereference Pageredirect_new(){
currentpageId = Apexpages.currentpage().getparameters().get('id');
redirectUrl = new pagereference('/a2A/e?CF00NK0000000cZqA='+account_name+'&CF00NK0000000cZqA_lkid='+currentpageId);
return redirectUrl ;
}
<apex:commandLink value="New" action="{!Pageredirect_new}">
<apex:param assignTo="{!account_name}" value="{!Account.name}" name="account_name"/>
</apex:commandLink>
I get the resulting URL as :
/a2A/e?CF00NK0000000cZqA=donotshow......
When I do
<apex:commandButton value="New" action="{!Pageredirect_new}">
<apex:param assignTo="{!account_name}" value="{!Account.name}" name="account_name"/>
</apex:commandButton>
The resulting URL : a2A/e?CF00NK0000000cZqA=null....
Am I missing something?