Javascript error with f:subview and jsp:include

Hi,

I have tried to include one jsp page with jsf components into another jsp page with jsf components. But somehow I get a Javascript error.

I have of course included the jsp:include into an f:subview like this:

<f:subview id="tree" rendered="#{tabsBacker.treeRendered}">

<jsp:include page="mission.jsp" />

</f:subview>

In mission.jsp, all non-jsf tags are surrounded by f:verbatim tags (otherwise, JBoss would complain anyway).

The Javascript error says: "elements.form1:_link_hidden_ is null".

"form1" is the name of the form in my jsp page which includes the other one.

As soon as I remove the jsp:include thing, everything works fine. The include happens in a t:panelTabbedPane, and (probably as a result of the javascript error), the tab where the included page should be shown, can't be displayed. I can click on the tab, the page is reloaded, but nothing else happens.

The error occurs in IE and in Firefox.

Can anyone help me to solve this problem?

Kind regards,

Wiebke

[1157 byte] By [Wiebke82a] at [2007-11-26 15:48:56]
# 1
I suggested forwarding this to the tomahawk folks.
rlubkea at 2007-7-8 22:08:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Yes, I will. But maybe someone here had the same error and solved it somehow...?
Wiebke82a at 2007-7-8 22:08:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Don't know if it'll help but I've seen jspf pieces stuck into pages using:

<tr>

<td valign="top"><%@ include file="../WEB-INF/jspf/browseForm.jspf" %></td>

</tr>

Don't know about using jsp:include though,

Illu

Illua at 2007-7-8 22:08:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
That sounds interesting. What are .jspf files? I always use .jsp files for my web pages with jsf controls in it...
Wiebke82a at 2007-7-8 22:08:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

It's just a jsp fragment file. Here's the start of the jspf included above:

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<%@ taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx" %>

<f:subview id="browseForm">

<table class="box" width="100%">

<tr>

<td><h:outputText value="#{labels.someValue}" styleClass="smalltitle"/></td>

</tr>

And so on. This was just done to stop the jsp files becoming too long, I think. So the subview tag is included in the jspf file rather than around the jsp file as you have it.

Illu

Illua at 2007-7-8 22:08:32 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...