In my SpringMVC form, I was facing the problem of binding a Disabled Text Box to a Model object. The issue is that, even if initially populated, after submitting the form the Disabled box's contents are lost on the next page refresh, because Disabled fields aren't submitted.
However, I solved this by just adding a Hidden field that binds to the same property. Now my Disabled text box retains its contents even after submission. Is this the correct approach, if I need to always show the property value in my Disabled box?
<form:input path="signatureBlock.signature" disabled="true"/>
<!-- Hidden field to submit Signature with form, binds to the same Model property -->
<form:hidden path="signatureBlock.signature" />