Skip to main content
Post Undeleted by Saroj Bera
deleted 78 characters in body
Source Link
Saroj Bera
  • 14.8k
  • 2
  • 20
  • 37

You can pass the parameters with <apex:param tag. You needhave to combine <apex:param withuse <apex:commandLinksetRedirect(true); in your controller as below. Hope this helps.

<apex:page standardController="Contact" extensions="CommandLinkParamController">  
    <apex:form >
        <apex:commandLink value="Processpublic Nickname"PageReference action="saveNextResponse(){!processLinkClick}">
         //doing a DML <apex:paramas name="nickName"well
         pageRef = new PageReference('/apex/Question');
    value="{!contactpageRef.firstname}"setRedirect(true);
                assignTo="{!nickName}"/>pageRef.getParameters().put('question',nextQuestionId);
    pageRef.getParameters().put('filter',filter);
    </apex:commandLink>pageRef.getParameters().put('questionBank',questionBankId);
    </apex:form>return pageRef;
</apex:page>}

You can pass the parameters with <apex:param tag. You need to combine <apex:param with <apex:commandLink as below. Hope this helps.

<apex:page standardController="Contact" extensions="CommandLinkParamController">  
    <apex:form >
        <apex:commandLink value="Process Nickname" action="{!processLinkClick}">
            <apex:param name="nickName"
                value="{!contact.firstname}"
                assignTo="{!nickName}"/>
        </apex:commandLink>
    </apex:form>
</apex:page>

You have to use setRedirect(true); in your controller as below. Hope this helps.

public PageReference saveNextResponse(){
    //doing a DML as well
    pageRef = new PageReference('/apex/Question');
    pageRef.setRedirect(true);
    pageRef.getParameters().put('question',nextQuestionId);
    pageRef.getParameters().put('filter',filter);
    pageRef.getParameters().put('questionBank',questionBankId);
    return pageRef;
}
Post Deleted by Saroj Bera
added 124 characters in body
Source Link
Saroj Bera
  • 14.8k
  • 2
  • 20
  • 37

You can pass the parameters with <apex:param tag. You need to combine <apex:param with <apex:commandLink as below. Hope this helps.

<apex:page standardController="Contact" extensions="CommandLinkParamController">  
    <apex:form >
        <apex:commandLink value="Process Nickname" action="{!processLinkClick}">
            <apex:param name="nickName"
                value="{!contact.firstname}"
                assignTo="{!nickName}"/>
        </apex:commandLink>
    </apex:form>
</apex:page>
<apex:page standardController="Contact" extensions="CommandLinkParamController">  
    <apex:form >
        <apex:commandLink value="Process Nickname" action="{!processLinkClick}">
            <apex:param name="nickName"
                value="{!contact.firstname}"
                assignTo="{!nickName}"/>
        </apex:commandLink>
    </apex:form>
</apex:page>

You can pass the parameters with <apex:param tag. You need to combine <apex:param with <apex:commandLink as below. Hope this helps.

<apex:page standardController="Contact" extensions="CommandLinkParamController">  
    <apex:form >
        <apex:commandLink value="Process Nickname" action="{!processLinkClick}">
            <apex:param name="nickName"
                value="{!contact.firstname}"
                assignTo="{!nickName}"/>
        </apex:commandLink>
    </apex:form>
</apex:page>
Source Link
Saroj Bera
  • 14.8k
  • 2
  • 20
  • 37

<apex:page standardController="Contact" extensions="CommandLinkParamController">  
    <apex:form >
        <apex:commandLink value="Process Nickname" action="{!processLinkClick}">
            <apex:param name="nickName"
                value="{!contact.firstname}"
                assignTo="{!nickName}"/>
        </apex:commandLink>
    </apex:form>
</apex:page>