How to add ValueResolvers

28 views
Skip to first unread message

Johannes Ernst

unread,
Feb 1, 2018, 9:47:39 AM2/1/18
to handlebars.java
Newbie question:

It seems ValueResolvers are pluggable. I see there is a default list: ValueResolver.VALUE_RESOLVERS. But I don't quite see where/how I can change the defaults, or add to the list of resolvers.

So: How do I add my own ValueResolver?

Thanks,



Johannes.

Johannes Ernst

unread,
Feb 1, 2018, 3:34:25 PM2/1/18
to handlebars.java
I figured it out: create your own Context with a builder, such as:

Context.newBuilder( myModel ).push( myValueResolver ).build();



Reply all
Reply to author
Forward
0 new messages