La respuesta de Brian es buena, pero creo que podría ser un poco más descriptiva para la información.
Creamos interfaz de usuario: Repetir
<ui:repeat id="repeatOne" var="listofValues" varStatus="myVarStatus"> </ui:repeat>
Uso de la repetición de interfaz de usuario se puede acceder a los valores de la variable que asociado con la lista '' listofValues.
Usando varStatus podemos crear otra variable que contenga diferentes tipos de información. Por ejemplo, usando #{myVarStatus.index}
en nuestra lista para crear una tabla, podemos usar esta información para nuestro índice en nuestra lista.
1.
2.
3.
Por supuesto, si se especifica la matriz de empezar en 0, entonces también lo hará su lista a menos que sumar 1 a cada uno. # {myVarStatus.index + 1}
Estos también son muy útiles en arreglos 2D que necesitan utilizar 2 UI:Repeat
que están anidados.
Propiedad ___Getter_________Description
current getCurrent() The item (from the collection) for the current round of iteration
index getIndex() The zero-based index for the current round of iteration
count getCount() The one-based count for the current round of iteration
first isFirst() Flag indicating whether the current round is the first pass through the iteration
last isLast() Flag indicating whether the current round is the last pass through the iteration
begin getBegin() The value of the begin attribute
end getEnd() The value of the end attribute
step getStep() The value of the step attribute
Documentación adicional con enlaces:
- atributos de la interfaz de usuario: la repetición se puede encontrar here.