Hi Feike,
A RuntimeExtension is just a runtime function. In order to have it invoked
you would also have to write a Filter [1] that, whenever your “dateFormat”
option is detected in an expression, it would transform that expression in
a RuntimeCall that would call your runtime function. At [2] you have a
simpler filter that you could use as a source of inspiration.
Let me know if you need more help.
Cheers,
Radu
[1] -
https://github.com/apache/sling/blob/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/impl/filter/Filter.java
[2] -
https://github.com/apache/sling/blob/trunk/bundles/scripting/sightly/compiler/src/main/java/org/apache/sling/scripting/sightly/impl/filter/I18nFilter.java
On Fri, 7 Oct 2016 at 09:24 Feike Visser wrote:
> Hi there,
>
>
>
> I am working to implement [0], to add basically dateFormat option to a
> Sightly expression.
>
>
>
> Like ${ value @ dateFormat=’dd/mm/’ }
>
>
>
> Attached I have this implemented, but it is being invoked.
>
>
>
> Am I forgetting something?
>
>
>
> Thanks!
>
> Feike
>
>
>
> [0]: https://issues.apache.org/jira/browse/SLING-6102
>
>
>