We are having a requirement where in the page property should be disabled to author/edit
but can be seen in touch ui.
while it's value should change via code in the node.
could you try to put in your cq:dialog, inside the field that you need to make "readyOnly" the property disabled=true.
In this way the property is not editable from the page properties, but it's visible.
Let me know if this could be helpfull.
disabled=true is not allowing to change the field via code.
It gets persisted in the property but after hitting save and close.
It is still reflecting the old value.
Any readOnly available for page property?
Hi, could you share the code that you are using in order to change the property value?
I tested it, by using the disabled property and the following snippet to change a property by using java api:
ResourceResolver resourceResolver = getResourceResolver(resourceResolverFactory);
Resource resource = resourceResolver.getResource("/content/we-retail/language-masters/en/jcr:content");
Node node = resource.adaptTo(Node.class);
And it works properly. I'm able to change the value by using java code and the new value is visible in the page property dialog that is not editable by the authors.
Let me know.