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.

Every <strong>Spry</strong> data set maintains the notion of a current row.Bydefault,thecurrentrowissettothefirstrowinthedata<br />

set. A spry:detailregion worksinexactlythesamewayasaspry:region except that when the data set’s current<br />

row changes, the detail region updates automatically.<br />

The binding expressions in the detail region ({ingredients} and {calories}) display data from the data set’s<br />

current row when the page loads in a browser. When a user clicks a row in the master region table, however, the<br />

spry:setrow attribute changes the current row in the data set to the row the user selected.<br />

The {ds_RowID} data reference is a built-in part of the <strong>Spry</strong> framework that points to an automatically generated<br />

unique ID for each row in the data set. (See “Data reference options” on page 135.) When the user selects a row in<br />

the master region table, the spry:setrow attribute supplies the unique ID to the setCurrentRow method, which<br />

sets the current row in the data set.<br />

SPRY<br />

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

Whenever the data set is modified, all dynamic regions bound to that data set regenerate themselves and display the<br />

updated data. Because the detail region, like the master region, is an observer of the dsSpecials data set, it also<br />

changesasaresultofthemodification,anddisplaysdatarelatedtotherowtheuserselected(thenewcurrentrow).<br />

103

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

Saved successfully!

Ooh no, something went wrong!