// special handling for UIViewRoot since ComponentHandler.isNew()
// will always return true
if (parent instanceof UIViewRoot) {
List<PhaseListener> listeners = root.getPhaseListeners();
if (!listeners.contains(pl)) {
root.addPhaseListener(pl);
}
} else {
root.addPhaseListener(pl);
}
}