You need to sign in to do that
Don't have an account?
Chitra Thambirajan
How to include a visualforce page inside of another page
I have a visualforce page which contains 4 tabs.In one of the tab i need to include another visualforce page.
When I tried to do this with <apex:include> i got the following error
" Error: 'apex:form' component cannot be nested within form tags "
If I remove form tag in anyof the page,it contains lots of components that can not survive without form.
For instance if I delete the form tag then it is showing the error like
" Error: <apex:selectRadio> (under <apex:page>) must occur between <apex:form></apex:form> tags. "
In this situation how can I include one visual force page inside of another..?
Any idea would be appreciated..
Thanks in advance
Chitra
When I tried to do this with <apex:include> i got the following error
" Error: 'apex:form' component cannot be nested within form tags "
If I remove form tag in anyof the page,it contains lots of components that can not survive without form.
For instance if I delete the form tag then it is showing the error like
" Error: <apex:selectRadio> (under <apex:page>) must occur between <apex:form></apex:form> tags. "
In this situation how can I include one visual force page inside of another..?
Any idea would be appreciated..
Thanks in advance
Chitra
All Answers
Have you tried out using iframes?
I would suggest to use iframe instead of apex:include.
Thanks,
Sagar.
Is it same like simple iframe tag which we use in HTML...?
How can I get the page url to give for iFrame 'src' property..
Thanks in advance
Chitra
Sorry it might be a silly doubt..But I really dont know how to acheive..
<apex:iframe src="{!pageNameVariable}" /> - what must be the value for "pageNameVariable"
I should not place the visual force page name right.How can I map this variable with my VF page name...??
Thanks
Chitra
<apex:iframe src="pageToBeIcluded" />
Page is included but the entire page is coming,
I need only the page components..I do not want lfet navigation,it should work same like <apex:page showHeader="false">
but how can i achieve this in the <apex:iframe>... ??
Thanks in advance
Chitra
I just added showHeader="false' parameter with the inner page.
So now the framed page is coming as expected without the header & side bar..
Thanks
Chitra
But the iframe opens with the login screen asking the user to login?!?! How do i stop this from happening and opening the vf straight away?
Thanks