Two seperate data views in page doesnt work

0
Hi, I have created a details_page in which I want to allow users to upload an image while it shows the details that have been inputted. However, a page can only have one page parameter. How can I make one of the two parameters not a ‘page parameter’ so it will be able to show both?  The two solutions suggested by mendix:  Select the same entity for all data views using the page context Change the data source for them Don't work and give me more errors.
asked
3 answers
0

Indeed a page can only have one page parameter.

There are many ways to work with this. One pattern i use a lot is this:

Have an overview page containing for example a data grid with all recipes. This grid has a “details”-button which opens a readonly view of the details of a selected recipe.

This details view contains:

  1. an “edit recipe” button, leading to a pop-up where you can edit the attributes of the recipe.
  2. an “upload picture” button leading to a pop-up where you can upload a picture.

 

I hope this helps.

answered
0

the Recipe & MyRecipeImage objects should be related by an (1-1) association. If that’s not the case, I suggest you will implement that.

Then you can use the association to nest the dataview.

first dataview = Recipe object

Second dataview = nested inside the first dataview and is the MyRecipeImage over assocsiation 

Als, before continueing take a look here:https://learn.mendix.com/link/path/31/Become-a-Rapid-Developer-(Analyst)

answered
0

Both solutions work, thanks guys!

answered