I'm getting blocked on a jsp page and our 1 java engineer isn't able to help now.
There is a template called "module-review.jsp" that is loaded in 2 instances, via a normal page load an via an api that returns it as part of a json object.
There is a variable called "review.updatedDate". On a normal page view, this variable is loaded as a hashmap into the page and looks like this:
{_value=2009-07-02 11:54:30.0, class=sql-timestamp}
So if I want the date value, I use ${review.updatedDate._value}
However, when module-review.jsp is loaded by the API, the date value is returned directly as a date object, where ${review.updatedDate} returns the date value directly.
I need to have a set of conditional statements that will only display ${review.updatedDate} if ._value doesn't exist. Everything I have tried gives me errors that ._value doesn't exist, which is rather ironic.
I am currently trying to use this, but it fails on the 2nd conditional:
<c:if test="${ (not empty review.updatedDate['_value']) }">
${review.updatedDate._value}
</c:if>
<c:if test="${ (empty review.updatedDate['_value']) }">
${review.updatedDate}
</c:if>