Link to home
Start Free TrialLog in
Avatar of Alaska Cowboy
Alaska CowboyFlag for United States of America

asked on

Custom tag attribute value cannot be runtime expression. value: "[${ed.updateDate}]"

When using this syntax, "<td><fmt:formatDate value="${ed.updateDate}" pattern="MMM"/></td>"
I get this error: Custom tag attribute value cannot be runtime expression. value: "[${ed.updateDate}]"

I have the proper libraries:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

and I just copied the syntax from another screen, see code snippet

Notes:
1. This works fine: {ed.updateDate}, displays       2011-06-06
2. My IDE says "Invalid attribute (value)"
/********** This works ************/

<td>
	<c:choose>
		<c:when test="${(detail.subjArea eq 'CLI' || detail.subjArea eq 'MEM' || detail.subjArea eq 'IDM') && detail.offsetDays ne 0}"><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/>&nbsp;&nbsp;<img src="images/<c:out value="${offsetIcon}" />" height="16" width="14" alt="" title="Change Date may not be correct !"/></c:when>
		<c:when test="${(detail.subjArea eq 'CLM' || detail.subjArea eq 'PCLM') && detail.offsetDays ne 0}"><a class='thickbox' href="<c:out value="${paidDateURL}" escapeXml="true"/>"><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/>&nbsp;<c:out value="${detail.numPaidDates}"/></a>&nbsp;&nbsp;<img src="images/<c:out value="${offsetIcon}" />" height="16" width="14" alt="" title="Paid Date may not be correct !"/></c:when>
		<c:when test="${(detail.subjArea eq 'CLM' || detail.subjArea eq 'PCLM') && detail.offsetDays eq 0}"><a class='thickbox' href="<c:out value="${paidDateURL}" escapeXml="true"/>"><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/>&nbsp;<c:out value="${detail.numPaidDates}"/></a></c:when>
		<c:otherwise><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/></c:otherwise>		
	</c:choose>
</td>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alaska Cowboy

ASKER

ok. I will try that Monday. but its odd that the <fmt> works in other screens.

thank you.
Ok, I changed to
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

now get this:
/WEB-INF/jsp/parameter_list.jsp(95,67) JSPG0060E: Invalid jsp syntax []

My code is:
<td><fmt:formatDate value="${ed.updateDate}" pattern="MMM dd - E"</td>
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
bingo, thanks a lot, sorry for the debugging, I had it right in my original post, maybe all it needed was a space.

But good to go now !