You need to sign in to do that
Don't have an account?
Anjaneylu
Passing values from one Visualforce Page to another Visualforce Page/
Hi,
Here i need to pass values from One VF page to another VF page.
In one vf page i have selected some records or values and then i want to pass those values to another page.
So please help me..
Thanks in Advance.
Anji
Here i need to pass values from One VF page to another VF page.
In one vf page i have selected some records or values and then i want to pass those values to another page.
So please help me..
Thanks in Advance.
Anji
Below is the example for sending values from one page to another using POST.
Please note - For simplicity creating and serializing JSON of Data has not been mentioned. You need to prepare JSON of selected records.
Page1 - Page1SendPost
Page1SendPostCtrl
Page2RecievePost
Select this as best answer for others to help if it solved your problem.
1) Create one controller for both VF page
2) We can pass the value in URL
Here i need to send more recoreds or values .
So through URL it is complicated i think so.
is it ?
Can you tell me the code with the first method.
Thanks in advance.
Anji
http://cmlohani-force.blogspot.in/2012/06/single-controller-for-multiple.html
Please let us know if this will help you.
Thanks
Amit Chaudhary
this might be helpful
I have 2 visualforce pages and one controller, Visualforce page 1 has one field and Visualforce page 2 has 4 fields. My question is, how can I capture the value from that field on page1 and pass that value to particular field on page 2. Can this be done? Please let me know.
Here is my code:
I want to get the value from pg1 to get displayed in pg2 in the field current_Maturities_Long_Term_Debt_RUS__c.
How do I get it? need help ASAP.
Visualforce Page1:
<apex:page standardController="RUS_Debt__c" standardController="Sample1">
<apex:form>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:CommandButton value="Save" action="{!Save}" rendered="true"/>
</apex:pageBlockButtons>
<apex:pageBlockSection>
<apex:outputField value={!RUS_Debt__c.Current_Maturities_Ltd__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Visualforce Page2:
<apex:page standardController="Liabilities_And_Equity__c" extensions="Sample1">
<apex:form>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton value="Save" action="{!Save}" />
</apex:pageBlockButtons>
<apex:pageBlockSection>
<apex:inputfield value="{!Liabilities_And_Equity__c.Accounts_Payable_Affiliates__c}" />
<apex:inputfield value="{!Liabilities_And_Equity__c.current_Maturities_Long_Term_Debt_RUS__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Controller:
public class Sample1{
public RUS_Debt__c rdobj {get; private set;}
public Sample1(ApexPages.StandardController stdcntlr){
}
public PageReference Save() {
PageReference pgref = new PageReference('/apex/BSTestForm');
rdobj =Apexpages.currentpage().getParameters().get('id');
pgref.setRedirect(false);
return pgref;
}
}
Thanks.
Rupa.
1- Create an Apex Controller
2- Use the <apex:param> component.
So for the same page, we will use the <apex: param> component
Suppose:
We have two page blocks and we want to pass the value from one page block to another page block area
“”””””””””””””””””””””
<apex:pageBlock>
<apex:param name = “paramName” value = “Value To be pass”>
</apex:pageBlock>
<apex:pageBlock>
<!— Access the value here>
{! $CurrentPage.parameters.paramName }
</apex:pageBlock>
“””””””””””””””””””””””””””