You need to sign in to do that
Don't have an account?

Reg:Doubt in page reference
Hi All,
In my scenario ,
Select page(input)-select industry and product

Select page-click image

Detail page- it shows relevant information about the image

but in my case the detail page could not shows any informations.it couldn't receive any input from previous page(Select page).
My Code is:
Vfp-1(select page)
My Controller page:
if anybody knows please tell me.
Thanks,
M. Sivasankari.
In my scenario ,
Select page(input)-select industry and product
Select page-click image
Detail page- it shows relevant information about the image
but in my case the detail page could not shows any informations.it couldn't receive any input from previous page(Select page).
My Code is:
Vfp-1(select page)
<apex:commandLink target="_blank" action="{!hello1}"> <apex:image value="{!account.photo__c}" height="150" width="200" id="test" /> </apex:commandLink>
My Controller page:
public PageReference hello1(){ PageReference pagr= new PageReference('/apex/custrefdetail'); String searchStr1=ApexPages.currentPage().getParameters().get('searchStr'); //input - industry String productName1=ApexPages.currentPage().getParameters().get('productName');//input - product accprd = [SELECT Detail__c,Product__c from accproducts__c where Product__c =:productName1 and account__c in (select ID from Account where industry=:searchStr1)]; System.debug(productName1);//product System.debug(searchStr1);//industry pagr.setRedirect(false); return pagr; }product and industry values shows as null. I dont know how to pass the detail value in visualforce page2.
if anybody knows please tell me.
Thanks,
M. Sivasankari.
You're not setting the values prior to displaying them in Visualforce. It looks like you're setting productName1, searchString1 or any other fields prior to displaying them.
It could also be that your secondary or "custrefdetail" page is not reading the correct parameters in.
I would add some system.debug lines to your controller to see if your variables are getting set properly and go from there.
Thanks for your reply.
My full code
My controller
vfp-1 vfp-2