Form fields become read-only after reopening dialog with uncommitted object

0
Hi Mendix Community, I've encountered a strange behavior and would love to understand the root cause. ## The Issue: - I have a dialog with a data view containing form fields - When I create a NEW object → fields are editable ✅ - When I close dialog WITHOUT saving → fields become read-only ❌ - This happens even though all editability settings are correct ## Setup Details: - Data View: Editability = "Default", Read-only style = "Control" - Individual fields: Editable = "Default", Read-only style = "Based on data view (Control)" - Entity access rights: Full write access - No conditional editability rules ## What I've tested: - Fresh object creation → Works fine - Close dialog without commit → Fields become gray/read-only on reopen - After committing the object → Fields stay editable ## My Solution: I now either commit on save OR ensure required fields are filled and commit on cancel. This fixes the issue. ## Questions: 1. Is this expected Mendix behavior for uncommitted objects? 2. Is there official documentation about this? 3. What's the technical reason behind this behavior? Has anyone else experienced this? I'm curious if this is "by design" or a quirk. Thanks!
asked
1 answers
1

Yes, this is expected behavior in Mendix. When you close the dialog without saving, Mendix usually performs a rollback. If the object is new and was never committed, a rollback will delete that object.


When you reopen the dialog, the page may no longer have a valid object context. If a Data View has no proper context object, Mendix shows the fields as read-only or disabled. That is why the form looks gray even though your editability settings are correct.


The common best practice is to create a fresh object each time you open a “New” dialog and let Cancel simply rollback and close. Another option is to commit a draft object first if you want it to survive closing and reopening the dialog.


So this is not a bug. It is how Mendix handles uncommitted objects after rollback.

answered