@Override public void preVisit (final @Nonnull Layout layout) { final ComponentType component = createComponent(layout); if (rootComponent == null) { rootComponent = component; } else { attach((ComponentContainerType)components.peek(), component); } components.push(component); }
@Nonnull private ComponentType createComponent (@Nonnull Layout layout) { try { return (ComponentType)layout.createView(siteNode); } catch (NotFoundException e) { return createPlaceHolderComponent(layout); } }