Creating a simple JSF table
Most commonly, everything starts from a POJO class (or a EJB entity class), as shown in the following code—note that tables with hardcoded information were skipped:
public class Players { private String player; private byte age; private String birthplace; private String residence; private short height; private byte weight; private String coach; private Date born; private int ranking; public Players() {} public Players(int ranking, String player, byte age, String birthplace, String residence, short height, byte weight, String coach, Date born) { this.ranking = ranking; this.player = player; this.age = age; this.birthplace = birthplace; this.residence = residence; this.height = height; this.weight = weight; this.coach = coach; this.born = born; } ... //getters and setters }
Each instance of this POJO class is actually a row in the table displayed to the user (it's not mandatory, but usually...