Before going into Tapestry-specific work, let's prepare some helper classes. First of all, since we are going to deal with celebrities, it will make sense to create a Celebrity
class. Create a new package, com.packtpub.celebrities.model
, and then add to it a new class, naming it Celebrity
. The contents of this class can be as simple as this:
package com.packtpub.celebrities.model; import java.text.SimpleDateFormat; import java.util.Date; public class Celebrity { private long id; private String firstName; private String lastName; private Date dateOfBirth; private Occupation occupation; public Celebrity() { } public Celebrity(String firstName, String lastName, Date dateOfBirth, Occupation occupation) { this.firstName = firstName; this.lastName = lastName; this.dateOfBirth = dateOfBirth; this.occupation = occupation; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { Tapestrycelebrity collector web application, creatingthis...