}
public void broadcast(final FacesEvent facesEvent) throws AbortProcessingException {
super.broadcast(facesEvent);
if (facesEvent instanceof TabChangeEvent && facesEvent.getComponent() == this) {
final TabChangeEvent event = (TabChangeEvent) facesEvent;
// switched off, because this is already called in super.broadcast()
// final TabChangeListener[] tabChangeListeners = getTabChangeListeners();
// for (TabChangeListener listener : tabChangeListeners) {
// listener.processTabChange(event);
// }
//
// final ActionListener[] actionListeners = getActionListeners();
// for (ActionListener listener : actionListeners) {
// listener.processAction(event);
// }
// XXX is this needed?
if (!isSwitchTypeClient()) {
final ActionListener defaultActionListener = getFacesContext().getApplication().getActionListener();
if (defaultActionListener != null) {
defaultActionListener.processAction(event);
}
}
final Integer index = event.getNewTabIndex();
final ValueExpression expression = getValueExpression(Attributes.SELECTED_INDEX);
if (expression != null) {
expression.setValue(getFacesContext().getELContext(), index);
} else {
setSelectedIndex(index);