Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 如何为JSP变量设置布尔值并在.tag类中验证它_Spring Boot_Jsp_Jsp Tags - Fatal编程技术网

Spring boot 如何为JSP变量设置布尔值并在.tag类中验证它

Spring boot 如何为JSP变量设置布尔值并在.tag类中验证它,spring-boot,jsp,jsp-tags,Spring Boot,Jsp,Jsp Tags,我想在下拉列表的每个选项前面添加一个非活动图标,如果它不是活动的。我使用select.tag类和.jsp类 这是.jsp的相关代码片段 <div id="reviewCategoryChoice"> <iTag:select path="reviewCategoryBeans" basicSelect="true" isActive= "${deactivationDate == n

我想在下拉列表的每个选项前面添加一个非活动图标,如果它不是活动的。我使用select.tag类和.jsp类

这是.jsp的相关代码片段

<div id="reviewCategoryChoice">
                        <iTag:select path="reviewCategoryBeans" basicSelect="true"
                        isActive= "${deactivationDate == null}"
                        cssClass="selectpicker"  label="Choose a service to modify"
                        required="true" defaultEmptyOption="Choose a service"
                        labelWidthClass="col-xs-4"
                        inputWidthClass="col-xs-7"
                        items="${reviewCategories}"
                        itemLabel="deactivationDate"
                        itemValue="id" />

这是select.tag的相关代码段

<c:when test="${not empty items and empty nestedItems}">
               <c:forEach items="${items}" var="item">     
                            <option value="${item[itemValue]}"
                                    <c:if test="${(not empty defaultValue) && (defaultValue == item[itemValue])}"> selected="selected"</c:if>
                                <c:if test="${isActive eq false}"> class="icon-mrs-is-inactive" </c:if>>
                                     ${item[itemLabel]}
                            </option>
                </c:forEach>
</c:when>

${item[itemLabel]}
即使这不会给出错误,条件也不会满足。我想确定.jsp类中的这些
isActive=“${deactivationDate==null}”
行和.tag类中的
class=“icon mrs is inactive”>
行是否正确或错误。 先谢谢你