*
* @see javax.faces.component.UIData#setRowIndex(int)
*/
public void setRowIndex(int index) {
FacesContext faces = FacesContext.getCurrentInstance();
ExtendedDataModel localModel = getExtendedDataModel();
boolean rowAvailable = isRowAvailable();
// if (rowAvailable) {
// save child state
this.saveChildState(faces);
// }
// Set current model row by int, but immediately get value from model.
// for compability, complex models must provide values map between
// integer and key value.
localModel.setRowIndex(index);
rowAvailable = isRowAvailable();
this._rowKey = localModel.getRowKey();
this._clientId = null;
boolean rowSelected = this._rowKey != null && rowAvailable;
setupVariable(faces, localModel, rowSelected);