Question about preselecting a entity in a listview via deeplink microflow and Show It in a Tab Container

0
Hello Mendix Community, I have a beginner question and would really appreciate your guidance. In my app, I have a List View displaying multiple entities, and a Tab Container that shows details of the currently selected entity.  Now, I’m implementing deep linking using a microflow, and I’d like to preselect an entity when the page is opened via a URL like /p/{id}. The microflow retrieves the entity based on the ID and opens the page. My question is: How can I make the retrieved entity appear as the selected item in the List View, so that its details are automatically shown in the Tab Container when the page loads? Any tips or best practices would be greatly appreciated!  
asked
1 answers
0

That's a tough one, and I'm not sure it's possible using just Mendix alone.

 

Here's an approach I’d try, although it does take a bit of effort:

 

Rebuild your page setup like this:

Create a non-persistent helper object and link it with a one-to-one association to the entity you want to select. Then, add a microflow or nanoflow that triggers when you click a list entry. That flow will set the association, which you can then use to show the relevant content in a tab container.

 

For the deeplink, you can use a microflow that creates the helper object and sets it to the target entity, then opens the page with the linked helper.

 

The only thing left would be styling the selected object. Since you're not relying on the default listview selection but handling it through a microflow, you'll need custom styling classes. You can base that on whether the current object matches the associated one.

 

answered