@SuppressWarnings("unchecked") public <T extends Renderer> T getRenderer() { FacesContext context = FacesContext.getCurrentInstance(); String componentFamily = component.getFamily(); String rendererType = component.getRendererType(); return (T) context.getRenderKit().getRenderer(componentFamily, rendererType); }
private FocusRenderStrategy getStrategy(AbstractFocus component) { switch (component.getMode()) { case FORM: return FORM_RENDERING_STRATEGY; case VIEW: return VIEW_RENDERING_STRATEGY; default: throw new UnsupportedOperationException( "Retrieving focus candidates in " + component.getMode() + " mode is not supported"); } }