jstl 判断后台bean的属性是否包含某个字段


loan.orderBy 是后台传递过来的bean,invest_time 是常量字符串
                                        <c:choose>
                                           <c:when test="${fn:contains(loan.orderBy,'invest_time')}">
                                              <c:if test="${fn:contains(loan.orderBy,'asc')}">
                                                 <b class="selectedUp"></b><b class="down"></b>
                                               </c:if>
                                              <c:if test="${fn:contains(loan.orderBy,'desc')}">
                                                 <b class="selectedDown"></b><b class="up"></b>
                                               </c:if>
                                           </c:when>
                                            <c:otherwise>
                                               <b class="up"></b><b class="down"></b>
                                            </c:otherwise>
                                        </c:choose>

你可能感兴趣的:(bean,jstl)