2017-08-26 4 views

答えて

1

JSTLを制限したいあなたは、文字列またはコレクションの長さを制限するためにこれを使用することができますfn:length()

と呼ばれる機能をしていると言いますifテストでサイズ。例えば

<c:forEach var="result" items="${resultList}" varStatus="status" > 

    // below you test if the string variable length is greater(gt) than 4 
    // If it is greater than 4, then the code below will show, else nothing. 

    <c:if test="${fn:length(result.mkType) gt 4}"> 
    <li> 
    ${result.mkType} 
    </li> 
    </c:if> 

</c:forEach> 
関連する問題