04.02.2013 Views

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

Spry User Guide - Support - Adobe

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 Create the detail dynamic region on the page by adding the spry:region attribute to the tag that will contain the<br />

region. The attribute uses the syntax spry:region="datasetName".<br />

Note: When creating master and detail relationships using two or more data sets, it is not necessary to use the<br />

spry:detailregion attribute as is outlined in “Create a basic master and detail page” on page 117. Because the<br />

current row of the detail data set never changes (it’s the current row of the master data set that changes), the<br />

spry:region attribute suffices. For more information, see “<strong>Spry</strong> advanced master and detail region overview and<br />

structure” on page 104.<br />

In the following example, a div tag contains the detail dynamic region:<br />

<br />

<br />

7 Within the tag containing the detail dynamic region, insert an HTML element to display the detail data from the<br />

current row of the master data set.<br />

SPRY<br />

<strong>User</strong> <strong>Guide</strong><br />

In the example, an HTML table displays detail data from the {name} column in the dsIngredients data set. The<br />

dsIngredients data set creates the {name} columnbasedontheinformationitreceivesfromthedsSpecials data set.<br />

<br />

<br />

<br />

Ingredients<br />

<br />

<br />

{name}<br />

<br />

<br />

<br />

The completed example code binding the master region to the dsSpecials data set, and detail region to the<br />

dsIngredients data set, would look as follows:<br />

120

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!