Question: NEED HELP WITH TAPESTRY ASSIGNMENT:(CODE IN JAVA) Step 1: Creating a custom entity type for your application First you will need a determine what kind
NEED HELP WITH TAPESTRY ASSIGNMENT:(CODE IN JAVA)
Step 1: Creating a custom entity type for your application
First you will need a determine what kind of custom entity that you would like your Tapestry site to display information about. This could be something like a Movie, Student, Automobile, Bank Account, Book, or Sports Team. This entity will be represented by a simple Java class (the instructions will refer to this as the CustomEntity class, but you should use a more appropriate name that is descriptive of your custom entity) with fields for the various properties and getter and setter methods for each field. You may use the automatic code generation of features of the IDE to create those methods for you.
You should also include a default constructor method (it does not need to assign any particular values to the fields) but may want to include other constructor or factory methods to make generating instances of your custom entity easier. You should also add a field of type int (or long) that will represent the primary key for the object as though it were a record in a database. You will need to include a getter method for this field. A setter method may not be necessary, but you will need to ensure that you have a constructor method that can set the value of the field in that case.
Your custom entity should have the following characteristics:
1.At least six different attributes (i.e. six different data fields)
2. At least one attribute should be text
3. At least one attribute should be a number of some type
4. At least one attribute should be of type Date (use this exact type for the field)
5. At least one attribute should have a limited number of valid options (e.g. on a web form, you would select the value with a drop-down combo box.) for its values. You may create a custom enum type for this field, which can make this easier.
6. At least two attributes should have some validation criteria such as a valid range for a number, text that cannot be an empty String, or even more complex criteria such as one Date attribute occurring after another Date attribute.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
