[opencms-dev] Iterating twice on a contentload list in OpenCms9

Stolmár Tamás knight at borsodi.qualitis.hu
Thu Sep 25 13:23:01 CEST 2014


Hi all,

I have a problem in OpenCms 9.0.1.

I have to do a search on a page, and iterate twice on the results.

Something like (based on the list-large.jsp formatter):

<cms:contentload collector="byContext" param="${collectorParam}" 
preload="true">
<cms:contentinfo var="info" />

<c:if test="${info.resultSize > 0}">

<cms:contentload editable="false">
<cms:contentaccess var="content" />
<p>${content.value.Title}</p>
</cms:contentload>

<cms:contentload editable="true">
<cms:contentaccess var="content" />
<p>${content.value.Title}</p>
</cms:contentload>

</c:if>
</cms:contentload>

If I remove the second <cms:contentload editable="true"> block, it works.
Else I get a null pointer exception deep from the tag library.

How can I reset back to the beginning of the resultset?
Or can I iterate first thru the xml objects somehow without the real 
contentload?

Thanks,
Tamas








More information about the opencms-dev mailing list