Changes

Jump to: navigation, search

Teams Winter 2011/team1/RCP/Create RPC Application

896 bytes added, 17:33, 8 March 2011
Add Model
=== Add Model ===
In order to have a data model for Student, we need to create a "Student Class" which keeps an student's data and "ModelProvider" Class that creates and keeps a list of Student class objects and helps us find an student by it's id from the list of students.<br/>
==== Create Model Package ====
Create a package named "cs.ecl.rcp.simplercp.model" in the src directory of your project.<br/>
==== Add Model Class(s) ====
Add a class named "Student" in the above package.
Add the student related fields and make sure that the class uses "PropertyChangeSupport" and "PropertyChangeListener" when setting the properties. For this purpose we need to have an instance of the "PropertyChangeSupport" class to be build by passing the Student object(this) to it, and implement the metods:"addPropertyChangeListener" and "removePropertyChangeListener". The following code demonstrates how to create the Student Model and how to add Property Change Support to the class.
<code>Student.java </code>
1
edit

Navigation menu