Using the Spry Framework
Trademarks
1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central,
ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite,
FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder,
Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit,
Studio MX, UltraDev, and WebHelp are either registered trademarks or trademarks of Adobe Systems Incorporated and may be
registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles,
words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Adobe Systems
Incorporated or other entities and may be registered in certain jurisdictions including internationally.
Third-Party Information
This guide contains links to third-party websites that are not under the control of Adobe Systems Incorporated, and Adobe
Systems Incorporated is not responsible for the content on any linked site. If you access a third-party website mentioned in this
guide, then you do so at your own risk. Adobe Systems Incorporated provides these links only as a convenience, and the inclusion
of the link does not imply that Adobe Systems Incorporated endorses or accepts any responsibility for the content on those third-
party sites.
© 2006 Adobe Systems Incorporated. All rights reserved. This manual may not be copied, photocopied, reproduced,
translated, or converted to any electronic or machine-readable form in whole or in part without written approval from
Adobe Systems Incorporated. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software
with which this manual was provided may print out one copy of this manual from an electronic version of this manual for
the sole purpose of such owner or authorized user learning to use such software, provided that no part of this manual may
be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation,
commercial purposes, such as selling copies of this documentation or providing paid-for support services.
Acknowledgments
Project Management: Charles Nadeau
Writing: Jon Michael Varese
Production Management: Adam Barnett
Media Design and Production: Adam Barnett, Masayo Noda
First Edition: January 2006
Adobe Systems Incorporated
601 Townsend St.
San Francisco, CA 94103
3
Contents
Using the Spry framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
About AJAX and the Spry framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
About AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
About the Spry framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
How Spry pages work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Anatomy of the Spry data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Anatomy of the Spry dynamic region . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Anatomy of the Spry basic master/detail dynamic region . . . . . . . . .11
Anatomy of master/detail dynamic regions that depend on
more than one data set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Building Spry pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
To prepare your files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
To create a Spry data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
To display data from a Spry data set . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Sample code: Spry data set and dynamic region . . . . . . . . . . . . . . . 23
To sort a Spry data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Numerical sorting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
To create basic master/detail dynamic regions. . . . . . . . . . . . . . . . . 25
To create master/detail dynamic regions that rely on
more than one data set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4Contents
5
Using the Spry framework
This help, which outlines how to use the Spry framework, contains the following topics:
About AJAX and the Spry framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
How Spry pages work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Building Spry pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
About AJAX and the Spry framework
This section contains the following topics:
■ “About AJAX” on page 5
■ “About the Spry framework” on page 6
About AJAX
Asynchronous JavaScript and XML, or AJAX, is a concept for how Web developers can use
various techniques to update web pages without requiring visible refreshes and without the
need for browser add-on technologies like Flash, Java, or ActiveX. AJAX is not a product,
company, or trademark.
Implementing AJAX features often requires knowledge of JavaScript, XML, and the
Document Object Model (DOM). Spry provides a light-weight, HTML-centric framework
that makes the task simpler.
For more information about AJAX, see http://en.wikipedia.org/wiki/AJAX.