5

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

For example, HashMap.size()

Mike Laren
  • 8,028
  • 17
  • 51
  • 70

2 Answers2

1

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.

Radu Cotescu
  • 534
  • 3
  • 10
  • Radu - Please take the time to read over the [markdown guide in help](http://stackoverflow.com/editing-help) so that you learn how to format your posts for readability. – Mogsdad May 07 '16 at 14:57
0

If I am not wrong you can do <p>${hashMap.size}</p> now using this with arguments I have absolutely no clue :)

I think that Gabriel Walt would be the best person to ask...

Bambara
  • 608
  • 5
  • 11