Multiple forms on a JSF view

[nobr]Hi!

Does somebody knows what I'm doing wrong here?

Look at this very basic example:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

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

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

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

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Test multiple forms</title>

</head>

<body>

<f:view>

<h:form>

<h:outputText value="Field 1: " />

<h:inputText value="#{testMultiform.field1}" /><br>

<h:outputText value="Field 2: " />

<h:inputText value="#{testMultiform.field2}" />

<br>

<h:commandLink value="Test form 1"

action="#{testMultiform.executeForm1}">

</h:commandLink>

</h:form>

<c:import url="footer.jsp"/>

</f:view>

</body>

</html>

and the imported file (footer.jsp) looks like this:

<%@ page language="java" contentType="text/html; charset=UTF-8"

pageEncoding="UTF-8"%>

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

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

<f:subview id="footer">

<h:form>

<h:commandLink value="Test form 2" action="exe2">

</h:commandLink>

</h:form>

</f:subview>

The example uses two forms components (one included with the c:import JSTL command), each with a commandLink component. I know that JSF permits two forms in a view. However the second commandLink, inside the second form component, is ignored. Could somebody say me the reason?

Thanks!

Christian[/nobr]

[2724 byte] By [clernta] at [2007-10-2 5:39:13]
# 1

The problem, seems to be a bug in the reference implementation from Sun (verision 1.1). Try with next version (1.1.01). Follow this link for a more extended explanation: http://www.manning-sandbox.com/thread.jspa?forumID=95&threadID=10732&messageID=33625#33625

(if the link is broken visit the site in http://www.manning-sandbox.com/ , where th bug is explained.

I hope this helps. Bye!

(another) Christian

chcaldeiroa at 2007-7-16 1:49:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...