+ Start a Discussion
Sudip Mondal 2001Sudip Mondal 2001 

Passing parameters from one VF page to another

Hi All,
I have a requirement where I need to send value from one VF page to another. I have digged out a few examples but none of them helped serving my needs.
Here goes the requirements in details:
I have used the <apex:repeat> tag to display the search results and whenever one of the returned result is clicked, the ID of the record should be transferred to a different visualforce page. Below is the code segment.
<apex:repeat var="u" value="{!usr}" >
						<div class="col-lg-4 col-md-4  col-xs-12  col-sm-6 resultItem" style="margin-top: 1%;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;display: inline-block;" onclick='cloneDetails("{!u.id}");'>
                           <a href="{!$Page.CloneThisUser}?Id={!u.Id}&q={!users}" class="list-group-item centerRow screenWidth" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;width:100%;">
                           <span class="itemTitle">{!u.Name}</span><br/>
                           {!IF(u.UserRole.Name != '', u.UserRole.Name, '')}<br/>
                           {!IF(u.isActive, 'Active', 'Inactive')}
I have created a JS function cloneDetails(id) that will do the sending to another page job.

The controllers of both the pages are different and merging them would be a big headache and hence we cannot take that as a solution. :(
Nitin SharmaNitin Sharma
Use template tag for showing one vf page to another
<apex:composition template="xyz"> where"xyz " is vf page name

Sudip Mondal 2001Sudip Mondal 2001
Hello Nitin,
Thank you for your time in this. 
The <apex:composition> template tag works just like a frame in the same page. So, it can be used instead of redirecting using pagereference but how does the values get transferred from one page to another? Being a newbie, I am unable to get onto a resolution. Kindly help me with an explanation