| (go back to full page) Iterator
dojoe.widgets.Iterator Class
The Iterator allows developer to loop over a data store and create the
components contained with in it. The iterator is derived from the Message Format
class that allows developers to format the content any of the ways provided by
Macros.
Attributes store: - The id of the data store that Iterator will use.
baseDojoType: - The dojoType that will be used when the components
is placed into the HTML DOM.
Events onItem: - Event called when the iterator creates a component.
onEndIterating: - Event called when completes iterating
onStartIterating: - Event called when the iterator starts iterating.
Markup with dojo.data
dojo.E Iterator Connected to a dojo.data Store
Los Angeles Angels Batting Average
<div dojoType="dojo.data.ItemFileReadStore" url="countries.json" jsId="countries"></div> <script type="text/xml" dojoType="dojoe.XmlScript"> <ui> <dojo.data.ItemFileReadStore url="js/dojoe/tests/widgets/angels.json" jsId="angels"/> <dojoe.widgets.Iterator store="angels" format="dojo.string.substitute"> Contry Name - ${name} </dojoe.widgets.Iterator> </ui> </script> |