我正在尝试利用Liferay Spring MVC Portlet 中的Lexicon 库切换。我正在为他们的表单标签使用 Spring 命令。这得到了我的 POJO 类布尔属性。我将其设置为 true 并将值“绑定”到输入值标签,但 switch 不会呈现为“on”。JSP:
<label>
<input name="POJO boolean property" id="POJO boolean property" value="${POJO boolean property}" class="toggle-switch" type="checkbox">
<span aria-hidden="true" class="toggle-switch-bar">
<span class="toggle-switch-handle">
<span aria-hidden="true" class="icon-ok toggle-switch-icon toggle-switch-icon-on">
</span>
<span aria-hidden="true" class="icon-remove toggle-switch-icon toggle-switch-icon-off">
</span>
</span></span>
</input>
</label>
相关分类