Turn entity read-only after it is opened through edit button

While creating screen through the wizard in the studio, it is noticed that there is a new option for read-only option of an entity that looks like below:


<action id="read" type="list_read"/>

image

How can I turn the “edit” button click action to “read” mode as I have to turn this in read mode subject to sine criteria?

Hi,

There is a method io.jmix.flowui.view.StandardDetailView#setReadOnly that you can invoke from withing the entity details view to make it read-only or editable.

1 Like

Thank you Maxim.