0
Я использую следующий код для отображения информации, однако я получаю исключение jstl. пожалуйста, предложить какой-либо альтернативный или правильный способ справиться с этойЛучший способ использования <c:choose> в случае нескольких опций
<div class="span3">
<c:choose>
<c:when test="${fn:length(alertStatusForm.totalSentRecipient) gt 0}">
<div class="row-fluid"><div class="span12"><a href="/event/alert/recipient/list/${alertStatusForm.forAlert.id}" class="underline">${fn:length(alertStatusForm.totalSentRecipient)}</a></div></div>
</c:when>
<c:otherwise>
<label style="color:black"><spring:message code='alert.voice.time.others'/></label>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${fn:length(alertStatusForm.totalNotSentRecipient) gt 0}">
<div class="row-fluid"><div class="span12"><a style="color: red" href="/event/alert/recipient/list/${alertStatusForm.forAlert.id}" class="underline">${fn:length(alertStatusForm.totalNotSentRecipient)}</a></div></div>
</c:when>
<c:otherwise>
<label style="color:black"><spring:message code='alert.voice.time.others'/></label>
</c:otherwise>
</c:choose>
<c:choose>
<c:when test="${fn:length(alertStatusForm.totalInProgressRecipient) gt 0}">
<div class="row-fluid"><div class="span12"><a href="/event/alert/recipient/list/${alertStatusForm.forAlert.id}" class="underline">${fn:length(alertStatusForm.totalInProgressRecipient)}</a></div></div>
</c:when>
<c:otherwise>
<label style="color:black"><spring:message code='alert.voice.time.others'/></label>
</c:otherwise>
</c:choose>
</div>
Значит, вы хотите показывать ссылки только в том случае, когда поля 'alertStatusForm' имеют значения? Какой они? Итоги для меня предлагают целые числа. – Tap
Какое у вас исключение? – Alex