Introduction to Using Java, JSON, and the Spry Ajax and JavaScript Framework
Introduction
Adobe's Spry Ajax and JavaScript framework provides web application developers with a relatively easy to use collection of dynamic tags, widgets and Ajax features. Behind the scenes, Spry can use either XML or JavaScript Object Notation (JSON) as the data source for its dynamic areas and widgets. Spry can be used with any server-side technology, including Java.
In this article I'll review how to use Java to transform a collection of Java objects into a collection of JSON objects and return the JSON objects to the browser where they can be used by Spry. I'll then show a simple Spry dynamic region that creates a table that can be sorted by each column heading. The table will contain a row for each JSON object. (Updated example includes an accordion widget and data paging)