Hi everyone,

First off, I am using displaytag 1.1. I am getting the following exception when I try to access an empty index inside a list for my column display

javax.servlet.jsp.JspException: Index: 0, Size: 0
at org.displaytag.render.TableWriterTemplate.writeTable(TableWriterTemplate.java:161)
at org.displaytag.render.HtmlTableWriter.writeTable(HtmlTableWriter.java:643)
at org.displaytag.tags.TableTag.writeHTMLData(TableTag.java:1549)
at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1218)

My bean has an infos list (when empty causes the above exception)

--- Here is my a sniplet of my JSP using the display tag ---
<display:table name="results" id="row" >
<display:column property="name" escapeXml="true" title="name" />
...
<display:column property="infos[0].property1" escapeXml="true" title="property 1"/>
<display:column property="infos[0].subProperty2" escapeXml="true" title="property 2"/>
...
</display:table>

--- I am able to get around it with the following modified JSP,
but I think the tag should display empty strings in this
scenario instead of throwing a JspException ---
...
<display:column escapeXml="true" title="property 1">
<c:if test='${row.info[0] != null}'>
<c:out value="${row.info[0].property1}"/>
</c:if>
</display:column><display:column escapeXml="true" title="property 2">
<c:if test='${row.info[0] != null}'>
<c:out value="${row.info[0].property2}"/>
</c:if>
</display:column>

...


Is this a bug in the display:column tag lib or maybe JSTL or am I missing something?

Regards,

Neon

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to