Home

 

Developing the view bean

Now that both developers have exactly the same synchronized HEAD branch of the RAD75CVSGuide project on their workspaces, it is time for the second developer to create the view bean View1.

Open the Web perspective.

In the Enterprise Explorer, right-click RAD75CVSGuide and select New Æ Class.

In the New Class dialog:

Type itso.rad75.teamcvs.bean for the Package.
Type View1 for the Name.
Select Generate comments.
Click Finish.

Figure 28-18 Creating the View1 view bean

Add the highlighted two private attributes in the View1 class...

Example 28-3 Add two private attributes to the View1 class

package itso.rad75.teamcvs.bean;
public class View1 {
	private int count;
	private String message;
}

In the Java Editor, right-click and select Source Æ Generate Getters and Setters, select Select All, and verify that the Access modifier is set public. Click OK.

Figure 28-19 Creating setters and getters for class View1

Save and close the View1 class.

Tip: In the Enterprise Explorer view, the greater than sign (>) in front of a resource name means that the particular resource is not synchronized with the repository. The question mark symbol (?) indicates that the file is not in the repository. These visual cues can be used to determine when a project requires synchronization.

ibm.com/redbooks