+ Start a Discussion
shinerajbshinerajb 

problem in redirecting to another page

 

i am having problem in this i am taking three vales from javascript--firstParam,secondParam,thirdParam
these are working correctly. but When i want to redirect This to another page i.E-- when i remove ---reRender="resultPanel"--
Then the values are coming as null, please do help me

Regards

Shine
------page---------
<span onclick="callActionMethod()" style="color:red;cursor:pointer"> Generate>>> </span></u></i></b>
<apex:actionFunction name="echo" action="{!echoVal}" reRender="resultPanel" status="myStatus">
<apex:param name="firstParam" value="" />
<apex:param name="secondParam" value="" />
<apex:param name="thirdParam" value="" />
</apex:actionFunction>

------page---------
-----code---------

echoVal()
{
val = Apexpages.currentPage().getParameters().get('firstParam');
val1= Apexpages.currentPage().getParameters().get('secondParam');
val2 = Apexpages.currentPage().getParameters().get('thirdParam');
industriestr_id=val2;
solutionstr_id=val;
regionstr_id=val1;
}
-----code---------

Gunners_23Gunners_23

If you want to pass the parameters to another page then you should use PageReferenence.getParameters().put('Id','Values');

 

But i don't get it, what you're trying to do in the controller method. you're not redirecting it to any page

shinerajbshinerajb

we are using pagr.redirect but it is throwing exception 

Shine

Gunners_23Gunners_23

could you please share the code?

shinerajbshinerajb

 

 

************VF page***********
javascript

 

function callActionMethod()
{
var txtVal0 = include;
var txtVal1 = include1;
var txtVal2 = include2;
echo(txtVal0,txtVal1,txtVal2);
}


<b> <i><u> <span onclick="callActionMethod()" style="color:red;cursor:pointer"> Generate>>> </span></u></i></b>
<apex:actionFunction name="echo" action="{!echoVal}" >
<apex:param name="firstParam" value="" />
<apex:param name="secondParam" value="" />
<apex:param name="thirdParam" value="" />
</apex:actionFunction>


**********Class************

public String val{get;set;}
public String val1{get;set;}
public String val2{get;set;}

public void echoVal()
{
val = Apexpages.currentPage().getParameters().get('firstParam');
val1= Apexpages.currentPage().getParameters().get('secondParam');
val2 = Apexpages.currentPage().getParameters().get('thirdParam');
}

 

The value is passing from VF page,but the value getting in class is as null