首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

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

2012-08-16 
在jsp中声明临时变量 c:setc:if test${not empty patients}c:set varflag value1 /?? ?c:f

在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>

热点排行