I have a field in my Xpage that I want to be readOnly and submitted to the database upon Save. This field gets a value from a Ajax call
Setting the property ReadOnly
You can add the readonly attribute with the attr-property:
Btw: The behaviour of the disabled and the readonly property is correct, because this is a definition on the server side. You want to edit the component with a value, that is why it must be allowed to accept values. Just disabling it on the client side has technically no effect.