Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRISOpens in a new window, see the InterSystems IRIS Migration Guide and Migrating to InterSystems IRIS, both available on the WRC Distributions pageOpens in a new window (login required).

Adding the Controller

Next, we add the controller, in this case a dataController component, to ZenTutorial.HomePage.cls. We use the modelClass attribute to associate the controller with the model, in this case ZenTutorial.ContactModel.

Place the following XML element anyplace in between the ZenTutorial.HomePage.cls <page></page> tags.

<dataController id="contactData"  
Copy code to clipboard

Note that the dataController component passes the value of the modelId attribute to the model's %OnOpenSource method. It represents the object ID of the database object that the model opens. Initially, we set the value of the modelId attribute to the empty string (""). Our application dynamically sets the value of this attribute to valid object ID values.

FeedbackOpens in a new window