Erro com Richfaces

3 respostas
V

Será que alguem poderia me ajudar estou tentando desenvolver um pequeno projeto para cadastro de alunos e esta dando esse erro .
Obrigado

javax.servlet.ServletException: class org.richfaces.component.html.HtmlDatascroller (id="j_id_jsp_288082420_12") did not find parent form.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:249)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>  
 <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>  
 <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>  
 <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>  
 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"  
    pageEncoding="ISO-8859-1"%>  
<html>
<head>
<title> Listagem de Alunos</title>
<link href="css/estilo.css" rel="stylesheet" type="text/css">
</head>
<body>
<f:view>
<h:outputText styleClass="title" value="Listagem de Alunos" /><br><br>



<rich:dataTable id="alunos" border="1" value="#{alunoBean.lista}" var="a" rendered="#{not empty alunoBean.lista}" rows="10">
	<h:column>
		<f:facet name="header" >
			<h:outputText value="Id" />
	    </f:facet>
	    <h:outputText value="#{a.id}" />
	</h:column>
	<h:column>
	    <f:facet name="header" >
	    	<h:outputText value="Nome"	/>
	    </f:facet>
	    <h:outputText value="#{a.nome}" />
	 </h:column>
	 <h:column>
	 	<f:facet name="header" >
	 		<h:outputText value =" Idade" />
	 	</f:facet>	
	 		<h:outputText value="#{a.idade}" /> 
	 	</h:column>
	 	<f:facet name="footer" >
	 		<rich:datascroller />
	 	</f:facet>
	 

</rich:dataTable>

</f:view>
</body>
</html>

3 Respostas

finotti

acho que está faltando declarar a tag <h:form>, depois do <body>

F

tipo tira o

&lt;f:facet name="footer" &gt;  
            &lt;rich:datascroller /&gt;  
&lt;/f:facet&gt;

e depois de fechar o </rich:dataTable>

coloca:

&lt;rich:datascroller for="alunos" maxPages="10"/&gt;

coloca o <f:view><h:form></h:form></f:view> tbm…

V

Ae, deu certo muito obrigado a quem ajudou ae, agora só resta eu saber como centralizar a tabela , porque o scroller esta centralizado , a tabela nao. mais vlw.

Criado 25 de agosto de 2010
Ultima resposta 26 de ago. de 2010
Respostas 3
Participantes 3