(JSF) commandLink nao funciona

0 respostas
indivito

Iae galera,

tou desenvolvendo um sisteminha em jsf em jsf e tenho um pagina q tem um cadastro e mostrar os itens em um datatable e tem um commandLink pra excluir e alterar cada item cadastrado! quando clico no commandLink a requisiçao nem chega no servlet!
e nao eh erro de validaçao pois nao aparece nenhuma mensagem.
ele simplesmente nao executa açao nenhuma!

a pagina ta cadastrando certinho mas os commandLink nao funcionam
segue abaixo a pagina jsf:

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> 
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> 
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title> CADASTRAR REGIONALIDADE</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />	
</head>

<body>
<f:view>

	<f:verbatim>
		<h3>Cadastro de Regionalidades</h3>
	</f:verbatim>
	
			<h:outputText value="#{regionalidadeBean.erros}"/>
			<h:messages/>	
			<h:form>
				<h:inputHidden value="#{regionalidadeBean.regionalidade.id}" id="IdBean" />
				
				<h:outputText value="Descricao:"/> 
				<h:inputText value="#{regionalidadeBean.regionalidade.descricao}" required="true" id="Descricao"/> 
				<h:message for="Descricao"/>
				<f:verbatim><br /></f:verbatim>

				<h:commandButton action="#{regionalidadeBean.cadastrar}" value="Cadastrar"/>				
				
			</h:form>
			
			
			<h:form>
						
				<h:dataTable value="#{regionalidadeBean.allObj}" rendered="true" border="1" align="center" var="r">
							
					<h:column>
					<f:facet name="header"><h:outputText value="Descrição"/></f:facet><h:outputText value="#{r.descricao}"/>
					</h:column>
							
					<h:column>
					
						<f:facet name="header"><h:outputText value="Excluir"/></f:facet> 
	
						<h:commandLink action="#{regionalidadeBean.excluir}">
							<f:param name="id" value="#{r.id}"></f:param>
							<h:graphicImage value="/images/excluir.jpg" style="border:1px solid white"
							 onmouseover="this.style.border='1px solid blue'"
							 onmouseout="this.style.border='1px solid white'"/>
						</h:commandLink>	
						
					</h:column>			
							
							
							
					<h:column>
						<f:facet name="header"><h:outputText value="Alterar"/></f:facet> 
	
						<h:commandLink action="#{regionalidadeBean.carregar}">
							<h:graphicImage value="/images/alterar.jpg" style="border:1px solid white"
							 onmouseover="this.style.border='1px solid blue'"
							 onmouseout="this.style.border='1px solid white'"/>
							<f:param name="id" value="#{r.id}"></f:param>
						</h:commandLink>	
					</h:column>			
					
	
							
			</h:dataTable>
			
		</h:form>
		
</f:view>

</body>
</html>

segue o faces-config com o mapeamento do bean

<managed-bean>
		<managed-bean-name>
		regionalidadeBean</managed-bean-name>
		<managed-bean-class>
		br.cefetrn.sisgea.controller.jsf.RegionalidadeBean</managed-bean-class>
		<managed-bean-scope>
		session</managed-bean-scope>
	</managed-bean>

valeu!

Criado 23 de agosto de 2006
Respostas 0
Participantes 1