| By Paul Gubbay | Article Rating: |
|
| May 19, 2007 02:45 PM EDT | Reads: |
19,580 |
Master/Detail Data Sets
The Spry framework
supports the concept of Master/Detail Data Sets. This implies that the
selected record in a Master Data Set drives the contents of the Detail
Data Set. There are many ways to create this relationship using Spry.
In our example the Master Data Set and the Detail Data Set retrieves
data from different sections of the same XML file. Each time a new
record is selected in the Master Data Set, the Detail Data Set
retrieves a subset of the data.
The Master Data Set is used to retrieve the products for the Products table. The Detail Data Set is used to retrieve the product features once a specific product is selected in the Product table.
Detail Data Set Declaration
The Detail Data Set and its relationship to the Master Data Set can be set up easily using one additional line of JavaScript:
Note that the main difference in the Detail Data Set declaration is the XPath. This XPath includes a filter expression and uses a Spry Token. The filter expression limits the nodes that will be returned for the dsProductFeatures Detail Data Set. The Spry token represents the "name" field for the current record in the dsProducts Master Data Set.
In effect the declaration states that the dsProductFeatures Detail Data Set will fetch its data based on the value of the "name" field in the current record of the dsProducts Master Data Set (see Figure 6). Every time the user selects a new record in the Master Data Set, this Detail Data Set will automatically update.
Master/Detail Regions
In Figure 7
the dsProductFeatures Detail Data Set is used to display the features
of a selected product in the Accordion widget. When the user chooses a
new product in the Product table, the features will change in the
Accordion without needing a page refresh.
Spry Widgets
Spry widgets are UI elements that
make it easier for your users to interact with the content on the page.
The current set of widgets (so far) includes:
- Accordion
- Menu Bar
- Collapsible Panel
- Tabbed Panels
- Text Field
- Text Area
- Checkbox & Checkbox Group
- Select list
- Widgets must be easy to modify (re-style).
- Code must be easy to understand.
- HTML-centric markup.
- No custom tags.
- No programmatic injection of markup.
- Self-contained (limit dependencies on additional libraries).
Each widget is broken down into three modules as in Figure 8.
Published May 19, 2007 Reads 19,580
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Paul Gubbay
Paul Gubbay is a director of engineering at Macromedia. Previously, Paul held the role of CEO at CyberSage Software, where he spent several years building the vision and infrastructure of the company. Under Paul's guidance, CyberSage focused on emerging technologies such as XML, Java, and Macromedia Flash to deliver leading edge product offerings.
- Kindle 2 vs Nook
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Moving Your RIA Apps into the Cloud: Seven Challenges
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Windows 7 – Microsoft’s First Step to the Cloud
- Ulitzer Provides a Powerful Social Journalism Platform
- Jill Tummler Singer, Deputy CIO of CIA, Keynotes at GovIT Expo
- Open Source Mobile Cloud Sync and Push Email
- Kindle 2 vs Nook
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing on Gartner's Top 10 List and SYS-CON Events' 2010 Calendar
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- US Post Office Hops a Ride on NetSuite’s Cloud
- Moving Your RIA Apps into the Cloud: Seven Challenges
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Building a Drag-and-Drop Shopping Cart with AJAX
- What Is AJAX?
- Google Maps! AJAX-Style Web Development Using ASP.NET
- Flashback to January 2006: Exclusive SYS-CON.TV Interviews on "OpenAjax Alliance" Announcement
- AJAXWorld Conference & Expo to Take Place October 2-4, 2006, at the Santa Clara Convention Center, California
- AJAX Sponsor Webcasts Are Now Available at AJAXWorld Website
- How and Why AJAX, Not Java, Became the Favored Technology for Rich Internet Applications
- "Real-World AJAX" One-Day Seminar Arrives in Silicon Valley
- AJAXWorld University Announces AJAX Developer Bootcamp
- AJAX Support In JadeLiquid WebRenderer v3.1
- Where Are RIA Technologies Headed in 2008?
- Struts Validations Framework Using AJAX





































