@ManagedBean
@ViewScoped
public class EmployeeBean {
private List<Employee> employeeList;
@PostConstruct
private void postConstruct() {
employeeList = DataService.Instance.getEmployees();
}
public List<Employee> getEmployeeList() {
return employeeList;
}
}
public class Employee {
private long id;
private String name;
private String phoneNumber;
private String dept;
.............
}
Running
To try examples, run embedded tomcat (configured in pom.xml of example project below):
mvn tomcat7:run-war
Output
On scrolling via arrow down key:
Example Project
Dependencies and Technologies Used:
primefaces 6.2:
PrimeFaces is one of the most popular UI libraries in Java EE Ecosystem and widely used by software companies, world renowned brands, banks, financial institutions, insurance companies, universities and more.
[Description from primefaces-6.2.pom]
jsf-api 2.2.14:
This is the master POM file for Oracle's Implementation of the JSF 2.2 Specification.
jsf-impl 2.2.14:
This is the master POM file for Oracle's Implementation of the JSF 2.2 Specification.