当前位置: 代码迷 >> JavaScript >> 在jsp中宣言临时变量 <c:set
  详细解决方案

在jsp中宣言临时变量 <c:set

热度:1139   发布时间:2012-08-16 12:02:15.0
在jsp中声明临时变量 <c:set
<c:if test="${not empty patients}"><c:set var="flag" value="1" />
?? ?<c:forEach var="patient" items="${patients}" varStatus="status">
????<tr>
?????<td align="center">
??????<c:choose>
???????<c:when test="${patient.isStop == 1 || patient.isCancel == 1}">
????????<input type="radio" name="patientID" value="${patient.id}" disabled/>
????????<c:if test="${status.count == 1}">
?????????<c:set var="flag" value="0"/>
????????</c:if>
???????</c:when>
???????
???????<c:when test="${flag == 0}">
????????<input type="radio" name="patientID" value="${patient.id}" checked="checked"/>
????????<c:set var="flag" value="${status.count}"/>
???????</c:when>
???????<c:when test="${flag == 1}">
????????<input type="radio" name="patientID" value="${patient.id}" checked="checked"/>
????????<c:set var="flag" value="2"/>
????????
???????</c:when>
???????<c:otherwise>
????????<input type="radio" name="patientID" value="${patient.id}"/>
????????<c:set var="flag" value="${status.count}"/>
???????</c:otherwise>
??????</c:choose>?????
?????</td>
  相关解决方案