
671
Powering Ajax Pages with Spry
17
When should you use Repeat and when Repeat Children? In most typical cases, they both
display the same results. However, the
spry:repeatchildren attribute is more flex-
ible and robust and is recommended for situations where the data might be filtered or
conditionally displayed. For more details on these scenarios, see the sidebar “Restricting
Repeated Spry Data” later in this section.
5. Select the desired data set from the Spry Data Set list.
6. If you have a current selection, choose either the Wrap Selection or Replace Selection option.
7. Click OK when you’re done.
Like Spry Region, placeholder text is inserted if a new
<div> or <span> tag is chosen. You’ll need to
delete the placeholder text and add any Spry data and/or HTML tags you want repeated.
The Spry Repeat object works well to repeat enclosed <p> tags or data inline. To repeat a
table row, you’ll need to add the spry:repeat or spry:repeatchildren attribute to
the <tr> tag manually in Code view or through the Quick Tag Editor, like this:
<tr spry:repeatchildren = “ds1”>
The Spry Repeat List object allows you to apply Spry repeat attributes to four different tag options:
<ol>, <ul>, <dt>, and <select>. Unlike the Spry Repeat object, the Spry Repeat List object
includes an option to select the data column you want to repeat; with the
<dt> and <select> tags,
you have an ability to s ...