I had Struts2 code to show a button based on the result of a date comparison like this (note that this is a simplified example of what I actually have):
<s:iterator value="myList">
<s:if test="%{getDate().compareTo(getNow()) > 0}">
// Show the item
</s:if>
</s:iterator>
I have since converted the display of the result set to use displaytag. How would I do the above using display tag. This is what I've tried.
<display:table name="myList" pagesize="50" id="row">
<display:column title="Item">
<s:if test="%{#attr.row.endDt.compareTo(#attr.row.now()) > 0}"><%--does NOT work--%>
</display:column>
</display:table>
What is the correct syntax of the <s:if>
statement?
Or can this not be done using displaytag + Struts2?