I missed this from two versions ago or so, but Spry has a new attribute to make master/detail work a bit easier. In the past, you would typically use code like this to display a set of data and allow a user to click to load a detail region:
<tr spry:repeat="mydata" onclick="mydata.setCurrentRow('{ds_RowID}');">
Notice the onclick? This tells Spry to update the current selected row. This is now done like so:
<tr spry:repeat="mydata" spry:setrow="mydata">
Love it. One more line of JavaScript removed.
Archived Comments
Quick comment on this.
If you are using a select box to update a spry:region, this might not work in IE, depending on how you implement the select box.
If you put your spry:repeat on the option tags within the select, and a spry:setrow on the option tag, the region will not update in IE. Apparently (this is conjecture- if someone knows for sure, please chime in) FireFox allows the select box's onChange event to pass down to the option tag, while IE will not. A co-worker ran into this yesterday.
We think that if he uses spry:repeatchildren and spry:setrow on the select box, then the region will get updated as expected.
Anyway, check your browser compatibility on this one.
Ray,
Gotta a spry question I failed to remember to ask, at the last breezo you did, I'm assuming since these Spry "attributes" are embeded within XHTML tags, that an application leveraging Spry doesn't validate with the W3C as valid XHTML...?
cheers
Check it out:
http://labs.adobe.com/techn...