Fill out the form below to watch this 2012 User Conference Session

Using Java Methods to Improve Velocity Scripts by Bryce Roberts (StoneRidge Corporation)

In this session, Bryce Roberts will discuss how Velocity users have access to the methods of the underlying Java classes for each Velocity variable. These classes provide the developer with ways to accomplish goals, which otherwise would be extremely difficult if not impossible to achieve programmatically. Some commonly utilized classes within Cascade development include object, string, number (subclasses such as int and float), map, array, date, iterator, and jdom. Example uses are adding attributes to selected nodes in unknown xml structures, wrapping selected elements, programmatic calculation of embed color schemes, and various efficiencies improvements. Learning objectives for this presentation are 1) understanding how to “call” methods with a velocity variable, 2) making a macro to invoke a method while ignoring its return, 3) programmatically adding Google Analytics tracking code to WYSIWYG content, and 4) Programmatically calculating a color schema based on user input.

 

We value your privacy and will never rent or sell your information.