Estou tentado fazer o desafio mas o que fiz de errado? Quero carregar um tabela contendo somente a coluna do nome de todos os autores. HTTP Status 500 - /autor.xhtml @27,19 value="#{autorBean.autores}": Property 'autores' not found on type br.com.caelum.livraria.bean.AutorBean
autor.xhtml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="_template.xhtml">
<ui:define name="texto">
Cadastro de Autor
</ui:define>
<ui:define name="titulo">
Autor
</ui:define>
<ui:define name="conteudo">
<h:form>
<fieldset>
<legend>Dados do Autor</legend>
<h:panelGrid columns="2">
<h:outputLabel value="Nome:" for="nome" />
<h:inputText id="nome" value="#{autorBean.autor.nome}" />
<h:commandButton value="Gravar" action="#{autorBean.gravar}">
<h:commandLink action="livro?faces-redirect=true" immediate="true" />
</h:commandButton>
<h:dataTable value="#{autorBean.autores}" id="tabelaAutores"
var="autor">
<h:column>
<h:outputText value="autor.nome" />
</h:column>
</h:dataTable>
</h:panelGrid>
</fieldset>
</h:form>
</ui:define>
</ui:composition>
</html>
AutorBean.class
package br.com.caelum.livraria.bean;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import br.com.caelum.livraria.dao.DAO;
import br.com.caelum.livraria.modelo.Autor;
@ViewScoped
@ManagedBean
public class AutorBean {
private Autor autor = new Autor();
public Autor getAutor() {
return autor;
}
public void gravar() {
System.out.println("Gravando autor " + this.autor.getNome());
new DAO<Autor>(Autor.class).adiciona(this.autor);
autor = new Autor();
}
public List<Autor> autores() {
return new DAO<Autor>(Autor.class).listaTodos();
}
}