Mendix 7 is no longer supported unless you have Extended Support. Mendix 7 documentation will remain available until July 2024.
To upgrade to a supported version, see Moving from Desktop Modeler Version 7 to Studio Pro 8.
Navigation Consistency Errors
1 Introduction
In this document, we will explain how to solve the most common consistency errors that can occur when configuring navigation in the Desktop Modeler.
An example of a consistency error is when you set a page that has a data view as a menu item.
2 Navigation Consistency Errors
The most common errors you can come across when configuring a navigation item are described in the table below:
Text in the Checks Panel | Cause of an Error | Way to Fix |
---|---|---|
The selected page {Name of the page} expects an object of type {type of object}, which is not available here. | You have set a page that expects an object to be passed to it (a page with a data view and a Context data source) as a menu item. | Pass an object to the page by changing the On click property of the menu item from Show a page to Create object. For more information, see section 2.1 Error Fix When the Selected Page Expects an Object |
The selected {Name of the page} expects an object of type {type of object} and cannot be used as a home page. Change the page or use a microflow to provide the page with an object. | You have set a page that expects an object to be passed to it (for example, a page with a data view) as a home page. But a home page has no object that is passed to it, because it is the starting point of a flow. | You can use a microflow as the home page that will open the preferred page and pass a specific object to the home page. For more information, see section 2.2 Error Fix When the Selected Home Page Expects an Object |
2.1 Error Fix When the Selected Page Expects an Object
When you set a page with a data view as a menu item, you get a consistency error, because the page expects an object to be passed to it.
For example, you have created a menu item called Program for a Responsive profile. This menu item opens the Program page. However, the Program page has a data view on it and expects a ProgramItem object to be passed to it, so that it can show the program details of a specific ProgramItem on the page. As a result, you get a consistency error, as no object is passed to this page from the navigation.
![Scheme Showing the Menu Item Error](/attachments/refguide7/desktop-modeler/consistency-errors/consistency-errors-navigation/dm-page-expects-an-object-error.png)
To fix the error, you can create an object and pass it to the page. Do the following:
-
Open the navigation for the responsive profile.
-
Open properties of the Program menu item, and do the following:
-
Change the On click property from Show a page to Create object.
-
Set ProgramItem as Entity (path).
-
Set Program as On click page.
-
Now when a user clicks the menu item, a new ProgramItem object will be created and passed to the page.
2.2. Error Fix When the Selected Home Page Expects an Object
If you set a page that expects an object to be passed to it as a home page for a navigation profile, you will get a consistency error.
Let us study an example: you have added a data view that expects an object of type Customer to the home page of the responsive profile, and you get a consistency error.
![Home Page Error](/attachments/refguide7/desktop-modeler/consistency-errors/consistency-errors-navigation/dm-home-page-error.png)
You can fix this error by creating a microflow that will that will create a new Customer object and pass it to the page. Do the following:
-
Open the responsive navigation profile.
-
In Default home page field click Select.
-
In the Select Navigation Target dialog window, click New, then select Create Microflow.
-
Name the microflow ACT_Open_HomePage.
-
Open the created microflow, add a Create Object activity to it
-
For the Create Object activity, set Entity to Customer.
-
Add Show Page activity to the microflow and do the following in the Show Page pop-up dialog:
-
Set Object to pass to NewCustomer.
-
Set Page to Home.
-
Now the new object of type Customer will be created and passed to the home page.
![Open Home Page Microflow](/attachments/refguide7/desktop-modeler/consistency-errors/consistency-errors-navigation/dm-open-home-page-microflow.png)