Possibility to make the editable option on a dataview avaible for conditional visibility - Mendix Forum

Possibility to make the editable option on a dataview avaible for conditional visibility

1

Simple usecase everyone has encountered during his short or long mendix life:

You make a form with a page parameter (data view) and with a data-grid on it. This data-grid has several buttons like new, edit and delete. Nothing fancy about this part.

 

Now you need this same form but read-only. Ok that's simple you imagine. It's the same form so you make a snippet of the first page and you create another read-only form including the snippet and the page parameter (data view) set to non-editable. Problem solved?! Not exactly.

 

Now you have two pages but the read-only page also has the same buttons on the grid as the edit variant. This isn't what you want. It's a read-only page and you don't want users to delete objects on a read-only page. Mendix can't now what your purpose is for the page but Mendix can provide you the tool to set up the right conditional visibility without to much hassle. It's already there!

 

The value if a dataview (or grid) is editable and you can use this value as conditional visibility. Maybe like ‘currentObject/_objectEditable’ (it's just a suggestion, please shoot for better naming / other options to solve this)

 

This would make my life so much easier and my apps more maintainable. Now I can use just one page for multiple purposes. I can imagine this option would help reduce the use of some widgets too, like ShowByCondition once in a while. 

asked
0 answers