I am building a very minilistic ToDO app. One screen only. The layout is starting with an edit field for entering and changing a todo item, which is only a description. Followed by the list of todo items not yet finished. I start with a Data View, followed by a List View. The List View connects to the domain model, the Data View listens to the List View. Ther are two items in the table. If I click on them the field changes in value, so that’s correct. But after clicking on the Save button the value in the input fields freezes. Am I missing something here? Is there another way to do this?
Freek van Keulen
To use the same data view for both creating new tasks and editing existing ones, you’ll want to use a helper object pattern. You’ll use a helper object to “wrap” the list view, and that will give you control over what is selected in the list view, and what happens when you click the “save” button.
This is rather hard to describe in pure text, so I put together a simple demo model using Mendix 8.1. You can download and open this file in Studio Pro 8.1: