| By Paul Gubbay | Article Rating: |
|
| May 19, 2007 02:45 PM EDT | Reads: |
19,596 |
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,596
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.
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Adobe Cans Another 9% of its Workforce
- Moyea DVD4Web Converter V2.0 Converts DVD to FLV Fast and Synchronously with Watermarks
- Adobe Fiddles with its Web Apps
- Adobe & Salesforce Cut Cloud Deal
- Hosting.com Launches ColdFusion 9 in the Cloud
- The Real Time Infrastructure Ultimatum
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Microsoft Expression Web Has Got Game
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Bruce Chizen Joins Voyager Capital as Venture Partner
- My Top Seven Wishes From Adobe MAX 2009
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- The Asynchronous CFML Gateway
- Web Services Using ColdFusion and Apache CXF





















