[jboss-user] [Installation, Configuration & DEPLOYMENT] - Jboss with Jsf <h:column> doesn't work

Vjger do-not-reply at jboss.com
Mon Oct 8 08:36:07 EDT 2007


Hi.
The example I'll post after doesn't work correctly with 4.0.x and 4.2.x as with jsf jboss library as with integrated jsf library.

This is my web.xml


  | 	<servlet-mapping>
  | 		<servlet-name>Faces Servlet</servlet-name>
  | 		<url-pattern>/faces/*</url-pattern>
  | 	</servlet-mapping>
  | 	<context-param>
  | 		<param-name>
  | 			org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL
  | 		</param-name>
  | 		<param-value>false</param-value>
  | 	</context-param>
  | 
  | 	<listener>
  | 		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  | 	</listener> 
  | 
  | 	 <taglib>
  |     	<taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
  |     	<taglib-location>/WEB-INF/html_basic.tld</taglib-location>
  |   	</taglib>
  |   	<taglib>
  |     	<taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
  |     	<taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
  |   	</taglib>
  | 
  | 

This is my faces-config.xml


  | <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
  | 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
  | 	version="1.2">
  | 
  |  
  | 	<application>
  | <navigation-handler>mydomain.web.util.NavigationManager</navigation-handler>
  | 	</application>
  | 	
  | 	
  | 
  | 	<navigation-rule>
  | 		<from-view-id>tipologicaStandardForm.jsp</from-view-id>
  | 		<navigation-case>
  | 			<from-outcome>paginaDiModifica</from-outcome>
  | <to-view-id>tipologicaStandardPaginaDiModifica.jsp</to-view-id>
  | 		</navigation-case>
  | 	</navigation-rule> 	
  | 
  | 	
  | 
  | 	<managed-bean>
  | 		<managed-bean-name>tipologicaStandardForm</managed-bean-name>
  | 		<managed-bean-class>mydomain.web.form.TipologicaStandardForm</managed-bean-class>
  | 		<managed-bean-scope>request</managed-bean-scope>
  | 	</managed-bean>
  | 		
  | </faces-config>
  | 

Finally, this is my jsp


  | 	<?xml version="1.0" encoding="ISO-8859-1" ?>
  | <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  |     pageEncoding="ISO-8859-1"%>
  | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
  | <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
  | <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
  | 
  | <html xmlns="http://www.w3.org/1999/xhtml">
  | <head>
  | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  | <title>Insert title here</title>
  | 
  | </head>
  | 
  | 
  | <body>
  | 	
  | 	<% java.util.List list = new java.util.ArrayList();
  | 		list.add("1");
  | 		list.add("2");
  | 		request.setAttribute("list",list);
  | 	%>
  | 	
  | 	<f:view>
  | 
  | <h:form>
  | 
  | 
  | 			<h:commandLink action="#{tipologicaStandardForm.paginaDiModifica}" value="Outside table"/>
  | 
  | 	<h:dataTable value="#{requestScope.list}" var="tipologicaStandard">
  | 		<h:column>
  | 			<h:commandLink action="#{tipologicaStandardForm.paginaDiModifica}">
  | 				<h:outputText value="#{tipologicaStandard}"/>
  | 			</h:commandLink>
  | 		</h:column>
  | 	</h:dataTable>
  | </h:form>
  | 	</f:view>
  | </body>
  | </html>
  | 

As you can read, there are two <h:commandLink> with the same action.
If you call this jsp, the result is:

Outside table
1
2



the first link, outside <h:datatable> works properly,  goes to server call the "paginaDiModifica" method and forwards the new jsp.
The two <h:commandLink> inside <h:column> go to server (I've seen it with debug) but don't call the method.

Thanks in advance.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092519#4092519

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092519



More information about the jboss-user mailing list