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

How to pass the values form Visualforce page To controller
Hi.. here iam using the apex:include page functionaliy, one page is included in the another page with common controller..
Vfpage1:
Commoncontroller:
On clicking on the button the data should have to pass to the Common controller. any solution how it can be achived.. thanks in advance..!
Vfpage1:
<apex:page controller="testingcontroller"> <apex:form > Entername<apex:inputText value="{!testwrap.name}"/> </apex:form> </apex:page>Vfpage2: Vfpage1 included in the Vfpage2.
<apex:page controller="testingcontroller" id="pg"> <apex:include pageName="Vfpage1" id="pge"/> <apex:form > <apex:commandButton value="test" action="{!test}" reRender="t" /> <apex:outputLabel id="t">{!message}</apex:outputLabel> </apex:form> </apex:page>
Commoncontroller:
public class testingcontroller { public string message{get;set;} public testwrapper testwrap{get;set;} public testingcontroller(){ testwrap = new testwrapper(); } public void test(){ message ='Hi hello'+testwrap.name; system.debug('testwrap.name=======>'+testwrap.name); } public class testwrapper{ public string name{get;set;} public testwrapper(){ this.name =''; } } }
On clicking on the button the data should have to pass to the Common controller. any solution how it can be achived.. thanks in advance..!
I hope you are doing well .....!!
Please use the below code:
First Visualforce page Name: V1.vfp
Second Visualforce Page Name: V2.vfp
Controller Name :testingcontroller
Hope this helps you.
Let me know your review.
If this helps kindly mark it as solved so that it may help others in the future.
Thanks & Regards,
Foram Rana
i think need to write some onclick functinality suchthat it can take the updated inputvalues from vusualforce page..., please provide your thoughts to achive it..
page1:
page:2
Controller:
I have checked my above code and I get updated value in System.debug().
Can you please try it again and let me know your review.
Thanks,
Foram Rana
1) but onchange you had called a actionfunction, so every time when it was updating, the page is getting refresh all the time so i used reRender in it..
2)but if iam using the reRender.. After Edition if i click immediately on the button , the values is not passing..
note: after updating , directly moving the cursr to the command button and on clicking the values are not geting updated in system.debug..
is it correct to use the Rerender in the Action function
Thanks
Deepika.