How to have a field always read-only in screens while not in model

Hi

We have calculated fields (statistics) in our entities, they are updated by the system, but must never be edited in screens.

If we define them as read-only in CUBA no setter will be generated so the model will not be able to update these fields.

Of course we can define ourselves a specific setter or the like, but is there a standard way do modelise that in CUBA ? And if not do you think it si worth a future evolution of the platform ?

I think about some kind of @System or @NoUiEdit annotation that you could define in Studio. This is probably the way we will solve this.

Mike

Hi Mike,

I don’t think it is a widely needed requirement, so a special support in Studio would be an overkill in my opinion.

The new Entity Attribute Access Control mechanism should allow you to implement making certain attributes read-only with minimum effort.

Great, in fact this will perfectly do the job. Thanks Konstantin.