如何根据后台传来的数据设置jsp页面中的checkbox的选中状态
后台传来的数据:model.addAttribute("stkFlag", stkFlag);(格式为数组,[S,E,M]).
jsp页面:<li>
<label><spring:message code="monitorInventory.stkFlag"/>:</label>
<lable><input name="stkFlag" type="checkbox" id="stkFlag1" value="S" /><spring:message code="monitorInventory.stkFlag.S"/></lable>
<lable><input name="stkFlag" type="checkbox" id="stkFlag2" value="M" /><spring:message code="monitorInventory.stkFlag.M"/></lable>
<lable><input name="stkFlag" type="checkbox" id="stkFlag3" value="E" /><spring:message code="monitorInventory.stkFlag.E"/></lable>
</li>
各位帮忙支个招,在线等,谢谢!