I have come to the problem, when I am using VF Page in which are VF Components loaded.

I have in my main page controller method, where i do SOQL for Account and save it into theAccount variable. My problem is, i cant increase SOQL queries because of limits. So I cant SOQL Account again in that child VF component.

Is there a way how to pass theAccount into the child component? Thanks for any help.


There are two way to do this.

  1. Pass the value in URL parameter
  2. One controller for both VF page

Here you can find the code to use one controller for nothe page.

PageReference pgref = new PageReference('/apex/NTSecondVfPage');
return pgref;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.