Hi All,
I can do the following to iterate over a collection.
<c:forEach var="currentErrorFile" items="${errorsCommandBean.errorFiles}" >
<c:out value="${currentErrorFile.absolutePath}" />
</c:forEach>
I want to include some code to print out a message if the collection is empty.
I was thinking to do it by making a JSTL level variable first so that I don't end up calling errorsCommandBean.getErrorFiles() twice. My problem is that this calls errorsCommandBean.getErrorFiles() which (by design) does some work to retrieve the files: it doesn't just return a reference.
I can't work out how to get a variable like this. Either useBean/set tags don't do it or I have misunderstood them.
Any help would be most appreciated!
Rob
:)