Custom Bindings in Apache Sling


When the <sling:defineObjects/> tag is used in a JSP within Apache Sling, several values are added as “bindings” that are available to the JSP code. There is service interface for bindings, BindingsValuesProvider. The question was asked by Tomek Rękawek on StackOverflow: how to add custom bindings? The answer came from the same Tomek Rękawek. The values defined by the BindingsValuesProvider are available within Sightly automatically. The value to use is bindings. It can be used to indirectly access the value. For a more complete explanation, see StackOverFlowHow to add a custom Sling binding?

About The Author

Deke departed Southern Alabama as a young man, leaving the humidity and fire ants behind. The fire ants are catching up with him. He works for Adobe. Despite that, his opinions expressed on this site are his own and should never, ever, be attributed or blamed on Adobe. Ask him what he thinks of chiggars sometime. Home Page | GitHub | Adobe Blog | Twitter | LinkedIn