Configure Model Views¶
Model views allow users to selectively display certain model elements from a complete model based on different business needs, as well as customize the display order and names of model elements. Application developers can differentiate and display various aspects of a model’s features by defining model views during application development.
For example, for a comprehensive “car” model, the following model views can be defined:
Basic Information View
Model type
Color
Production date
Performance Parameters View
Maximum Speed
Acceleration Time (0-100 km/h)
Range
Battery Information View
Battery Capacity
Charging power
Remaining battery percentage
Application developers can display the car’s basic information view on the “Overview” page, performance parameters on the “Details” page, and battery information on the “Energy Dashboard” page in a new energy vehicle monitoring system. This approach improves the adaptability of the model across different interfaces while reducing application development complexity.
This file explains how to configure model views for a model.
Prerequisites¶
You need permission to edit models. If you don’t have the permissions, contact your OU administrator for access. For more information, refer to Model Management Permission Allocation.
Create Model Views¶
1. In the application portal’s Developer Console, go to the Models page.
2. In the Custom Models or Shared Models tab, select Edit to enter the configuration page for the target model.
Note
When editing model elements of a shared model, you need to click the Custom Configuration button in the top-left corner to switch to the custom configuration interface before making changes. The effective configuration of a shared model = custom configuration + unchanged parts of the original configuration.
3. Select Model Views, then configure the basic information in the pop-up window according to the following rules, and click Confirm when done.
Name: The name of the model view.
Identifier: The unique identifier of the model view.
Edit Model Views¶
On the Model Views page within the model details, click the Configure button on the right of the target model view to enter the configuration page.
Click the Add button to the right of Sub-View, enter the following information in the pop-up window, and click Confirm:
Name: The name of the sub-view.
Identifier: The unique identifier of the sub-view.
Click Add Elements, select the required model elements in the pop-up window, and click Confirm.