I am blocked on the jsp page and our 1 java engineer is now unable to help.
There is a template called "module-review.jsp" that loads in 2 instances via the normal page load via api, which returns it as part of the json object.
There is a variable called "review.updatedDate". In a normal pageview, this variable is loaded as a hash map on the page and looks like this:
{_value=2009-07-02 11:54:30.0, class=sql-timestamp}
So, if I need a 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 does not exist. Everything I tried gives me errors that ._value does not exist, which is pretty ironic.
I am currently trying to use this, but it does not work in the second conditional expression:
<c:if test="${ (not empty review.updatedDate['_value']) }">
${review.updatedDate._value}
</c:if>
<c:if test="${ (empty review.updatedDate['_value']) }">
${review.updatedDate}
</c:if>
Geuis source
share