In my Jsp i am having radio buttons for
typeA
typeB
typeC
typeD
I have used following tag :
<c:forEach var="abcTyp" items="${abcTypeList}">
<form:radiobutton path="abcType" value="<spring:message code="label.admin.lot.${abcType.value}" />" label="${abcTyp.value}" onclick="actSingStone();"/>
</c:forEach>
but instead of using "abcTyp.value" as a label,i want to use internationalized message form resource bundle .
I tried using
<form:radiobuttons path="abcType" value="${abcTypeList}" label="<spring:message code="label.admin.pep.${abcTyp.value}"/>." onclick="actSingStone();"/>
in my resource file i have mentioned
label.admin.pep.typeA = some text
label.admin.pep.typeB = some text
label.admin.pep.typeC = some text
label.admin.pep.typeD = some text
but it's giving an error "equal symbol expected"
Can anybody give me solution for the same....??
Try setting the label to variable and use it, like below
<c:forEach var="abcTyp" items="${abcTypeList}">
<c:set var="labelVar">
<spring:message code="label.admin.lot.${abcType.value}" />
</c:set>
<form:radiobutton path="abcType" label="${labelVar}" value="${abcTyp.value}" onclick="actSingStone();"/>
</c:forEach>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With