활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
I want get the length or size of my list in aem sightly,so is there any property like size to get the total count of elements in the list?
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
you can use the methods that you have in Java for the concerned object.
Like
${ myArray.length}
${ myList.size }
Modifying my comments:-
Very well said by Feike , i tried by creating a small sample in my local and able to get size of list.
${<useClassObject>.<ListMethodName>.size}
For Example:-
In java:-
public List getTestList() {
return testList;
}
In HTML:-
<sly data-sly-use.useClassObj = "com.ups.components.use.ArrayListClassUse">
Size of List:- ${useClassObj .testList.size}
</sly>
Hope it helps. Thanks Feike for quick response.
조회 수
답글
좋아요 수
you can use the methods that you have in Java for the concerned object.
Like
${ myArray.length}
${ myList.size }
Yes Prince. , Please try the way Feike has mentioned here.
조회 수
답글
좋아요 수