Specifying form checkbox value with spring message
Can I specify the form:checkbox tag value with spring:message tag? Seems like a silly questio开发者_开发技巧n, but it seems hard to find the right syntax, if there's any.
Something like this should work:
<fmt:message key="myKey" var="myLabel" />
<form:checkbox path="foo"
id="${commandName.foo}"
label="${myLabel}"
value="${commandName.foo}" />
where myKey
is the key you'd use in <spring:message code="myKey"/>
精彩评论