You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Gabor Kisch <ga...@hotmail.com> on 2005/11/17 10:48:03 UTC
messes up my JSF
Hello,
First of all, forgive me if this is af dumb question. I am new to JSF and my
question might therefore be somewhat stupid.
I am trying to make the Tomahawk PanelNavigation_1 and PanelNavigation_2 to
work with <jsp:include> since I need the navigation menu to appear on
several of my pages. I have created a file called inc_nav.jsp, where I have
copied the entire code from the original file panelnavigation_1.jsp. My
PanelNavigation_1.jsp for example now looks like this:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
<title>MyFaces - the free JSF Implementation</title>
<link rel="stylesheet" type="text/css" href="css/basic.css" />
</head>
<body>
<f:view>
<f:loadBundle
basename="org.apache.myfaces.examples.resource.example_messages"
var="example_messages" />
<f:subview id="nav">
<jsp:include page="inc_nav.jsp"/>
</f:subview>
</f:view>
</body>
</html>
-------------------------------------------------------
My inc_nav.jsp when testing PanelNavigation_1 looks like this:
<%@ page contentType="text/html" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<f:subview id="nav_inc">
<t:div id="subnavigation_outer">
<t:div id="subnavigation">
<t:panelNavigation2 id="nav1" layout="list" itemClass="mypage"
activeItemClass="selected" openItemClass="selected" >
<t:commandNavigation2 value="#{example_messages['panelnav_products']}"
action="go_panelnavigation_1" >
...original code for creating the navigation list...
</t:commandNavigation2>
</t:panelNavigation2>
</t:div>
</t:div>
</f:subview>
------------------------------------------------
For PanelNavigation_1, the CSS styles are gone, and for PanelNavigation_2, I
get a thrown exception: "javax.servlet.ServletException: Client-id : _id1 is
duplicated in the faces tree". I have tried (re)moving <f:subviews> back and
forth and changing to <%@ include file%>, but that didn't work either...
Being able to include pages with this kind of active content simply must
work somehow, but I can't figure out how. Any help on this subject (which
probably has a very simple solution) would be GREATLY appreciated!
Kind regards,
Gabor (Sweden)