"Errors on page" with simple JSF page

Hi

I wrote a very simple JSF page as shown below. It works as is with MyFaces. Now I tried to make it work with Sun RI as well.

Here's the problem: The page appears perfectly fine (it shows two columns of links). Only one single link works, though: the first one in the left column.

When I click on that first link, the action handler method ("userClick") is called and executed fine.

But when I click on any other link, the method is not called at all. All I get is an "error on page" message in the browser status bar. No log message on the command line or log file.

Am I doing something wrong? With MyFaces it works fine.

===============================

Here's the page:

===============================

<%@ page language="java" pageEncoding="UTF-8"%>

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

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

<f:view>

<f:loadBundle basename="ca.gc.nrc.iit.eConservatoire.frontend.bundles.MessageBundle" var="bundle" />

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title><h:outputText value="#{bundle.menu_frame}" /></title>

<link rel="stylesheet" href="style.css">

</head>

<body>

<h:panelGrid border="1" columns="2" columnClasses="td">

<h:dataTable value="#{MenuBackingBean.menuTabItems}" border="0" var="menuTabItem" >

<h:column>

<h:form>

<h:commandLink action="#{MenuBackingBean.userClick}" >

<h:outputText value="#{menuTabItem.itemName}" />

<f:param name="itemID" value="#{menuTabItem.itemID}" />

</h:commandLink>

</h:form>

</h:column>

</h:dataTable>

<h:dataTable value="#{MenuBackingBean.menuItems}" border="0" var="menuItem" >

<h:column>

<h:form>

<h:commandLink action="#{MenuBackingBean.userClick}" >

<h:outputText value="#{menuItem.itemName}" />

<f:param name="itemID" value="#{menuItem.itemID}" />

</h:commandLink>

</h:form>

</h:column>

</h:dataTable>

</h:panelGrid>

</body>

</html>

</f:view>

==================================

Here's the faces-config

==================================

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<faces-config >

<application>

<locale-config>

<default-locale>en</default-locale>

<supported-locale>en</supported-locale>

<supported-locale>de</supported-locale>

</locale-config>

<message-bundle>ca.gc.nrc.iit.eConservatoire.frontend.bundles.MessageBundle</message-bundle>

</application>

<managed-bean>

<managed-bean-name>DetailsBackingBean</managed-bean-name>

<managed-bean-class>ca.gc.nrc.iit.eConservatoire.frontend.DetailsBackingBean</managed-bean-class>

<managed-bean-scope>session</managed-bean-scope>

</managed-bean>

<managed-bean>

<managed-bean-name>MenuBackingBean</managed-bean-name>

<managed-bean-class>ca.gc.nrc.iit.eConservatoire.frontend.MenuBackingBean</managed-bean-class>

<managed-bean-scope>session</managed-bean-scope>

</managed-bean>

<managed-bean>

<managed-bean-name>ContentBackingBean</managed-bean-name>

<managed-bean-class>ca.gc.nrc.iit.eConservatoire.frontend.ContentBackingBean</managed-bean-class>

<managed-bean-scope>session</managed-bean-scope>

</managed-bean>

<navigation-rule>

<from-view-id>/menu.jsp</from-view-id>

<navigation-case>

<from-outcome>showDetails</from-outcome>

<to-view-id>/details.jsp</to-view-id>

</navigation-case>

<navigation-case>

<from-outcome>menu</from-outcome>

<to-view-id>/menu.jsp</to-view-id>

</navigation-case>

</navigation-rule>

<navigation-rule>

<from-view-id>/details.jsp</from-view-id>

<navigation-case>

<from-outcome>showMenu</from-outcome>

<to-view-id>/menu.jsp</to-view-id>

</navigation-case>

<navigation-case>

<from-outcome>showContent</from-outcome>

<to-view-id>/content.jsp</to-view-id>

</navigation-case>

</navigation-rule>

<navigation-rule>

<from-view-id>/content.jsp</from-view-id>

<navigation-case>

<from-outcome>showMenu</from-outcome>

<to-view-id>/menu.jsp</to-view-id>

</navigation-case>

</navigation-rule>

</faces-config>

=======================================

I don't think I need to show the backing bean with the userClick() method since the error is that this method is not even called (I added a system.out.println() to this method - which is never executed)

So the problem must be before

BTW I am using Sun RI 1.1.01 as shipped with the MyEclipseIDE extensions.

Thanks a lot for your very much appreciated help

scrut

[5775 byte] By [scruta] at [2007-10-2 21:37:06]
# 1
The problem is that you have two forms. Put a single form.
pringia at 2007-7-14 0:51:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...