问题
In my JSP code I have the following:
<s:iterator value="details" id="cle" status="rowCle">
<s:iterator value="value" status="row" >
<tr>
<s:if test="%{#surname== ''}">
<td> </td>
</s:if>
<s:else>
<td class="reference"><s:property value="%{getText(key.longname.toLowerCase()) }" /></td>
</s:else>
Depending on the value of surname (which is a field with getter in my object details, so it is in the value stack) I want to display the value longname or blank.
I have no problem to display {getText(key.longname.toLowerCase()), I also display surname later in my code, so my only concern is about testing the content of surname to check if it is null or empty.
I have tried several options such as
"%{#surname== ''}">
%{surname== null}'>
'%{#surname== null}'>
but none works.
I am a bit lost. anybody would have a solution please?
Thank you. B.