You need to sign in to do that
Don't have an account?
gnasa
what is difference between including a page and a component.
Hello friends,
I have a doubt about what is the difference between including a page(apex:include) and a component(apex:component).
I mean, when should I use apex:include and when should I use apex:component.
Can any one help me understand this?
Thanx.
<apex:include> is used when you want to insert that page as it is in your current page. The entire contents of that page is copied in your current page.
<apex:component> is defining a component before using it. In simple words, lets say you define that 'myValue' component is a string type. but the value to that string will be assigned in the destination page.
in the above example, you are defining attribute name 'Myvalue' as a string type. but the value of this string is assigned in the page. MyValue="My component's value".
Hope this helps you
Also, if you include a page that uses the same controller as the parent page, the same instance of the controller is shared between them.