th:readonly and th:value problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

th:readonly and th:value problem

alanBE
I have:

<input th:unless="${#strings.contains(session.userProfile.permission, 'UPDATE_GENERAL')}" th:readonly="readonly" type="email" th:value="${systemSetting.email}"name="email">

I want to disable this input if there is no userProfile permission.

Problem is: if I have the readonly attribute, the th:value does not appear.
If I removed readonly attribute, the th:value's value appears.

Can I have readonly and the th:value appear together?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: th:readonly and th:value problem

Reiju
just add 'readonly' or 'disabled' to ur input-tag without using th:namespace