This example demonstrates how to create responsive DataTable so that it can be displayable on all screen sizes. We just need to use reflow="true" with <p:dataTable /> tag.
Creating managed bean
@ManagedBean
@ViewScoped
public class EmployeeBean {
private List<Employee> employeeList = new ArrayList<>();
.............
public List<Employee> getEmployeeList () {
return employeeList;
}
}
public class Employee {
private long id;
private String name;
private String phoneNumber;
private String address;
.............
}