Adding the Controller
Next we add the controller, in this case a dataController component, to PersonPage.cls. The controller mediates between the view and the model.
Place the following code in PersonPage.cls between the <page></page> tags.
<dataController id="personData"
modelClass="MVFILE.PersonModel"
modelId="" />
Note the following about the code:
-
The modelClass attribute associates the dataController with the model class.
-
The modelId attribute represents the object ID of a Caché database object. The dataController passes this value to the model's %OnOpenSource. Our application sets this value dynamically, so here we can specify the empty string as its value.