<s:iterator value="MonitorSnInfos" id="MonitorSnInfos" status="s" var="MonitorSnInfos">
<tr>
<td><input type="checkbox" name="SN_choice" value="<s:property value="snName"/>" /></td>
<td><s:property value="snName"/></td>
<td><s:property value="nodeId"/></td>
<td><s:property value="preNodeId"/></td>
<td><s:property value="oanFunction"/></td>
<td><s:property value="snuFunction"/></td>
<s:if test="#MonitorSnInfos.cpuUtilizationRate > #MonitorSnInfos.cpuUtilizationThreshold">
<td style="color:#FF0000"><s:property value="cpuUtilizationRate"/></td>
</s:if>
<s:else>
<td style="color:#0C0"><s:property value="cpuUtilizationRate"/></td>
</s:else>
<s:if test="#MonitorSnInfos.memoryUtilizationRate > #MonitorSnInfos.memoryUtilizationThreshold">
<td style="color:#FF0000"><s:property value="memoryUtilizationRate"/></td>
</s:if>
<s:else>
<td style="color:#0C0"><s:property value="memoryUtilizationRate"/></td>
</s:else>
</tr>
</s:iterator>
struts2中iterator标签的嵌套使用(if/else),并根据内容调整字体颜色
最新推荐文章于 2019-10-19 11:34:49 发布