Skip to main content

Posts

Tridion Beanification - Expression Language Evaluator for JSP/JSTL Templates

The " beanification " I am presenting here -- which could in fact be called the " DGX 's Java steroided big-brother " -- is the functionality that enables writing EL for the JSP/JSTL Tridion templates, part of the Java Mediator I am currently working on. I knew writing this piece would be fun, but I underestimated how much fun it would really be. I had a blast! :) <geek sneers here/> EL simplifies writing rather complex expressions by providing the possibility of writing the expression just using the . and [ ] syntax. The dot ( . ) is used to specify ' Java Beans '-like properties on a given object, and the square brakets ( [ ] ) specify an indexed element on any property that returns a collection. Example:     ${Page.ComponentPresentations[1]} looks up the Page object, then accesses the ComponentPresentations list property on it and finally returns the 2nd Component Presentation as denoted by [1] . The Tridion beanification, in...