using iframe in JSF
hi...i have a problem, can anyone help me with my iframe problem..i try to use two iframes, one for the menu n the other for the selected page...but what i got only one frame showing, the other frame disappear from the presentation..can anyone give solution?i also have tried to use <f:verbatim> ....
[313 byte] By [
klsa] at [2007-11-27 8:16:07]

# 2
<f:view>
<ui:page binding="#{index.page1}" id="page1">
<ui:html binding="#{index.html1}" id="html1">
<ui:head binding="#{index.head1}" id="head1">
<ui:link binding="#{index.link1}" id="link1" url="/resources/stylesheet.css"/>
</ui:head>
<ui:body binding="#{index.body1}" id="body1" style="-rave-layout: grid">
<ui:form binding="#{index.form1}" id="form1">
<f:verbatim>
<div style="left: 0px; top: 0px; position: absolute">
<iframe src="MainMenu.jsp"></iframe>
</div>
</f:verbatim>
<f:verbatim>
<div style="left: 200px; top: 0px; position: absolute">
<iframe src="Home.jsp"></iframe>
</div>
</f:verbatim>
</ui:form>
</ui:body>
</ui:html>
</ui:page>
</f:view>
only frame with src 'mainmenu.jsp' shows up...the other iframe doesn't appear in the browser..any solution?
klsa at 2007-7-12 20:00:59 >

# 4
thanz friend for ur suggestion to look at the page source..I figure out something strange with the page source.. Actually in my JSF code, i already put close tag for iframe (</iframe>) but at the page source no close tag was detected, that's make my second frame disappear..So i just simply put some text between the opening tag n close tag of iframe, i.e <iframe name="MainMenu.jsp" ....>anytext</iframe> and it works..
Ok, thanz again for ur help n reply...actually i have many many many questions about JSF...hehehe.. i'll post them in another thread...
klsa at 2007-7-12 20:00:59 >

# 5
Hi,
This is general problem. Just a few lines of explanation before giving the work around.
If there is empty value inside the tags, JSF engine will conver the tags into self closing tags. for e.g.,
<iframe src="sss"></iframe>
will be converted to
<iframe src="sss" /iframe>
According to the XHTML standards, self closing tags are not supported and the browser will look for the closing tag.
Work around:
Please place some text inside the tags. (user cannot view that text any how)
<iframe src="sss">some text</iframe>
Definitely your problem will be solved.
Of course this is work around, but you may not have another option.