I have created a Java class method getmyPages()
which returns iterator<Page>
.
Now in HTML page I am able to instantiate the class and access other properties of this class.
However I want to iterate over this iterator the way currentPage.listChildren
works.....
Since currentPage.listChildren
returns iterator<Page>
I am also returning same.
However I am not able to ...... the HTML tag in which I am printing this comes out empty.
You can use
data-sly-list
attribute to loop over an iterator. Here's an excerpt from Feike Visser's Sightly tutorials :data-sly-unwrap
attribute can be used to prevent enclosing tag of the loop from being part of the final mark upLink to the tutorials : http://blogs.adobe.com/experiencedelivers/experience-management/sightly-intro-part-1
Documentation of
data-sly-list
: link