开发者

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"/>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜