dataTable Problem
I am very new to JSF and I have a simple problem.
I am trying to use dataTable to display a List but it is not working.
Here is my code:
<f:view>
<h:form>
<h:dataTable border="1" value="#{StudentBean.students}" var="studentlist">
<h:column>
<f:facet name="header" >
<h:outputText value="Student Name" />
<h:outputText value="#{studentlist.student.name}" />
</f:facet>
</h:column>
</h:dataTable>
<h:outputText value="#{studentlist.student.name}" />
</h:form>
</f:view
And here is my backing bean:
import java.util.ArrayList;
import java.util.List;
import org.polaris.business.logic.Student;
import org.polaris.database.DatabaseConnection;
/**
*
* @author john
*/
publicclass StudentBeanextends DatabaseConnection{
private List students =new ArrayList();
/** Creates a new instance of StudentBean */
public StudentBean(){
}
public List getStudents(){
/** @ check if data exists for students */
Student student =new Student();
student.setName("Doe, John");
students.add(student);
return this.students;
}
publicvoid setStudents(List students){
this.students = students;
}
}
As you can see the example is very very simple, but the data ("Doe, John") is not displayed in the table. Can anyone see what is my error?
Thanks>

