I'm trying to use and iFrame to load different content of the center pane in layout. The code below seems to work. For the first two click on the left nav (west pane links), content load in the center pane, but the third (and any subsequent) click always opens a new window regardless of which link is clicked.
Any ideas?
Thanks
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a="http://richfaces.org/a4j"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:rich="http://richfaces.org/rich"
contentType="text/html">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/>
<a:loadStyle src="resource:///stylesheet/theme.xcss"/>
<a:loadStyle src="/stylesheet/theme.css"/>
<p:resources />
</head>
<body>
<p:layout fullPage="true" widgetVar="mainLayout">
<p:layoutUnit position="north" resizable="false" closable="false">
<h:outputText value="North unit content" />
</p:layoutUnit>
<p:layoutUnit position="west" width="250" minSize="150" maxSize="400">
<h:outputText value="West unit content" />
<ul>
<li><a href="http://www.google.com" target="mainFrame">Top of Page</a></li>
<li><a href="http://news.bbc.co.uk" target="mainFrame">Content Start</a></li>
<li><a href="http://www.primefaces.org" target="mainFrame">Footer</a></li>
</ul>
</p:layoutUnit>
<p:layoutUnit position="east" closed="true" size="200" minSize="150" maxSize="400">
<h:outputText value="East unit content" />
</p:layoutUnit>
<p:layoutUnit position="center">
<iframe scrolling="auto" height="100%" frameborder="0" width="100%" src="http://plugins.jquery.com/project/Layout" name="mainFrame" id="mainFrame" pane="center"></iframe>
</p:layoutUnit>
<p:layoutUnit position="south">
<h:outputText value="South unit content" />
</p:layoutUnit>
</p:layout>
</body>
</html>
</f:view>