getChildren().insert(widget, beforeIndex);
// Adopt.
adopt(widget);
final Add addWidget = new Add(widget.getID(), getID());
addWidget.put(PROPERTY.BEFORE_INDEX, beforeIndex);
addWidget.put(PROPERTY.TAB_WIDGET, tabWidget.getID());
Txn.get().getTxnContext().save(addWidget);
}