如果条件在表标签中

问题描述 投票:0回答:1

我正在使用Spring Roo。有table:tabletable:column标签。

<table:table data="${memberDetails}" id="memberDetail" delete="false"
                 create="false"
                 update="false" show="false" paginationFlag="false"
                 path="" typeIdFieldName="instanceId"
                 z="40I0ZgJoR5iBRXkYGHvl959736E=">
    <table:column id="customer" property="user.name"/> 
</table:table>

如果属性null不为空,我如何检查user.name或为空?如果它是空的我想在那里解决其他财产。

spring-mvc spring-roo
1个回答
0
投票

检查此代码

<c:if test="${user.name =='null'}" >
 <table:column id="customer" property="user.name"/> 
</c:if> 

或者你可以使用

 <c:if test="${not empty user.name}">
       <table:column id="customer" property="user.name"/> 
    </c:if> 
© www.soinside.com 2019 - 2024. All rights reserved.