0

I want to include other VF page into my visualforce page, what is the best way to do that except using iframe?

  • Do you want to include another VF page or a external page ? – SL man Oct 25 '15 at 3:30
  • already edited my question. :) – rpm07 Oct 25 '15 at 3:31
1

The best way to do it would be to either:

  1. Use <apex:include>

A component that inserts a second Visualforce page into the current page. The entire page subtree is injected into the Visualforce DOM at the point of reference and the scope of the included page is maintained.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_include.htm

  1. Or if Appropriate create and use a visual force Component

The body of an tag is the markup that is added to a standard Visualforce page whenever the component is included. For example, the following Visualforce page uses the component defined in Custom Component Markup (in this example, the component was saved with the name myComponent)

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_comp_cust_using.htm

Caveat for both of these: You cannot use a page or component using <apex:form> inside the parent page's <apex:form> tags.

| improve this answer | |

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.