OCLOperators ViewModels
Created by Alexandra on 2017-08-13 · Last edited by Sandra.akech on 2025-12-11.
A tuple with the ViewModels for this class as members.
Note: Use this OCL operator whenever a ViewModel name is required as an argument for an expression as this ensures proper error checking when the ViewModel name changes compared to supplying the ViewModel name argument as a String.
For example, use it like this:
self.opendocumentreportshow(<classname>.ViewModels.<myviewmodelname>)
A name change to a ViewModel will break this expression and show an error in the model validation.
Example:
Customer.ViewModels.OrderSummary- Go to class
Customer - Get its
ViewModels - Pick the ViewModel named
OrderSummary
This provides a safe reference to that ViewModel.
self.opendocumentreportshow(Customer.ViewModels.OrderSummary)If OrderSummary is renamed:
- MDriven model validation fails, and a red error message is displayed, making it easy to identify and fix the issue.
