Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to invoke the non-getter methods in sightly?

Tags:

java

aem

sightly

I want to invoke non-getter methods in sightly, is that possible?

For example, HashMap.size()

like image 439
vijayanand kesavan Avatar asked Nov 09 '22 16:11

vijayanand kesavan


1 Answers

You can call any publicly accessible method on your Use objects or on the global objects available to your Sightly scripts, as long as the method doesn't need parameters.

For more details about the implementation of discovering the available methods on your objects you could check RenderUtils.java.

like image 176
Radu Cotescu Avatar answered Nov 14 '22 22:11

Radu Cotescu