I have a JSP that is using Spring:form tags to bind controls to a command object.
I would like to modify it as follows: if [some condition is true] than display the controls; otherwise, just display the text. (Examples: if the user is an Admin, display the controls, otherwise just display the text. If the whatsit is still open for modification, display the controls, otherwise display the text.)
In other words, I want this:
<c:choose>
<c:when test="SOME TEST HERE">
<form:input path="SOME PATH" />
</c:when>
<c:otherwise>
<p>${SOME PATH}</p>
</c:otherwise>
</c:choose>
But I want an easy way to create this for every field (there are many).
If I create a custom tag to generate the above text (given "SOME PATH"), will the Spring custom tags get bound?
I guess what I'm really asking is: can I create custom tags that generate Spring custom tags that then get bound? Or do all custom tags (mine and Spring's) get handled simultaneously?