Friday, March 27, 2009

How do you identify a component created in a repeater

Question :How do you identify a component created in a repeater?
Answer :: If currentIndex value is greater than startIndex value means a component is created in Repeater.
We can use count property to find number of children.
A Repeater component executes initially when it is instantiated. If the Repeater component's
dataProvider property exists, it proceeds to instantiate its children, and they instantiate their
children, recursively.
The Repeater component re-executes whenever its dataProvider, startingIndex, or count
properties are set or modified either explicitly in ActionScript, or implicitly by data binding.
When a Repeater component re-executes, it destroys any children that it previously created
(assuming the recycleChildren property is set to false), and then reinstantiates its children based
on the current dataProvider property.

No comments: