Another Salesforce blog!!!

Salesforce, Apex

PageReference


public PageReference goBack() 
    {
        PageReference pr = Page.DC_TableDetail;
        pr.getParameters().put('tblId',tblId);
        pr.getParameters().put('colId',colId);
        return pr;
    }
   <apex:repeat value="{!Employees}" var="e" id="r">
    <apex:commandLink value="{!e.Name}" action="{!clickOnName}">
         <apex:param name="eId"
         value="{!e.Id}"
         assignTo="{!empId}"/>
    </apex:commandLink>
   </apex:repeat>
public Id empId{get; set;}
public PageReference clickOnName() 
{
    system.debug('clickOnName//'  ); 
    PageReference newPage = Page.NewEmployee; 
    newPage.getParameters().put('empId', empId);  
    return newPage.setRedirect(true); 
} 

Leave a Reply

Your email address will not be published.

*