我的Spring Web模型 - 视图 - 控制器中有这个类( MVC)框架。 Spring Web模型 - 视图 - 控制器(MVC)框架的版本是3.2.8。
我在JSP中有这个
<form:select id="statusKeyId" path="statusKey" cssStyle="width: 150px" >
<form:option value="0"><fmt:message key="select.option.all"/></form:option>
<c:forEach items="${allStatusList}" var="statusVar">
<form:option value="${statusVar.key}" >
<c:choose>
<c:when test="${!(statusVar.name eq 'AWARDED') && !(statusVar.name eq 'CANCELLED') && !(statusVar.name eq 'IN_PROGRESS') && !(statusVar.name eq 'REFUSED')}" >
<fmt:message key="${statusVar.key}" />
</c:when>
<c:otherwise>
<fmt:message key="${statusVar.key}" />
</c:otherwise>
</c:choose>
</form:option>
</c:forEach>
</form:select>
这是生成页面的来源:
<select id="statusKeyId" name="statusKey" style="width: 150px">
<option value="0">All</option>
<option value="AWARDED" selected="selected"> AWARDED </option>
<option value="NO_PENDING_OPERATIONS"> No pending operations </option>
<option value="IN_PROGRESS_EXTENSION"> With an In Progress Extension </option>
<option value="WAITING_FOR_WITHDRAW"> Waiting for Tdk Permit Withdrawal </option>
<option value="MODIFICATION_IN_PROGRESS"> With modification in progress </option>
<option value="RENEWAL_REQUEST"> With a pending renewal request </option>
<option value="DISCARDED">DISCARDED</option>
<option value="Permit_DISCARDED_EXPIRY_PERMIT"> Expiry of Permit PERMIT </option>
<option value="Permit_DISCARDED_HOLDER_WITHDRAWAL"> Award Holder Withdrawal </option>
<option value="Permit_DISCARDED_NON_PAYMENT_FEES"> Non Payment of Fees </option>
<option value="Permit_DISCARDED_OTHER"> Other </option>
<option value="IN_PROGRESS">IN PROGRESS </option>
<option value="REFUSED"> REFUSED </option>
</select>
如您所见,选择了AWARDED选项,但在页面中选择了0 / ALL选项