public static boolean isScript(UIComponent component) { return RENDERER_SCRIPT.equals(component.getRendererType()); }
public static boolean isStylesheet(UIComponent component) { return RENDERER_STYLESHEET.equals(component.getRendererType()); }
protected static void validateRenderer(FacesContext context, UIComponent source, UIComponent component, String expression, int hints) { if (SearchExpressionUtils.isHintSet(hints, SearchExpressionHint.VALIDATE_RENDERER) && context.isProjectStage(ProjectStage.Development)) { if (LangUtils.isValueBlank(component.getRendererType())) { LOGGER.warning("Can not update component \"" + component.getClass().getName() + "\" with id \"" + component.getClientId(context) + "\" without a attached renderer. Expression \"" + expression + "\" referenced from \"" + source.getClientId(context) + "\""); } } }
/** * @see javax.faces.component.UIComponent#getRendererType() */ @Override public String getRendererType() { return parent.getRendererType(); }
/** * @see javax.faces.component.UIComponent#getRendererType() */ public String getRendererType() { return parent.getRendererType(); }
/** * @see javax.faces.component.UIComponent#getRendererType() */ @Override public String getRendererType() { return parent.getRendererType(); }
private boolean isNestedWithinUIData() { UIComponent parent = this; while (null != (parent = parent.getParent())) { if (parent instanceof UIData || "facelets.ui.Repeat".equals(parent.getRendererType())) { return true; } } return (false); }
public static boolean shouldWriteId(UIComponent component) { String rendererType = component.getRendererType(); String id = component.getId(); if ((id != null) && !id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { return true; } if ((rendererType != null) && (rendererType.startsWith(ORG_AJAX4JSF) || rendererType.startsWith(ORG_RICHFACES))) { return true; } return false; }
public boolean isListenerForSource(Object source) { return EnvUtils.isPortal() && source instanceof UIComponent && "javax.faces.Head".equals(((UIComponent) source).getRendererType()); } }
public static boolean shouldWriteId(UIComponent component) { String rendererType = component.getRendererType(); String id = component.getId(); if ((id != null) && !id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { return true; } if ((rendererType != null) && (rendererType.startsWith(ORG_AJAX4JSF) || rendererType.startsWith(ORG_RICHFACES))) { return true; } return false; }
public static boolean shouldWriteId(UIComponent component) { String rendererType = component.getRendererType(); String id = component.getId(); if ((id != null) && !id.startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { return true; } if ((rendererType != null) && (rendererType.startsWith(ORG_AJAX4JSF) || rendererType.startsWith(ORG_RICHFACES))) { return true; } return false; }
public boolean isListenerForSource(final Object source) { FacesContext context = FacesContext.getCurrentInstance(); return EnvUtils.isICEfacesView(context) && "javax.faces.Body".equals(((UIComponent) source).getRendererType()) && intervalBeforeExpiry > -1; } }
/** * @deprecated since 1.5.0, please use ThemeConfig.getMeasure() */ @Deprecated public static boolean hasValue(final FacesContext facesContext, final UIComponent component, final String name) { Deprecation.LOG.warn("please use ThemeConfig.getMeasure()"); return ResourceManagerFactory.getResourceManager(facesContext).getThemeMeasure( facesContext, component.getRendererType(), null, name) != null; } }
UIComponent headFacet = context.getViewRoot().getFacet("javax_faces_location_HEAD"); if (headFacet == null) { System.out.println("No Head Facet"); } else { System.out.println("Head Children: " + headFacet.getChildCount()); for (UIComponent c : headFacet.getChildren()) { System.out.println(c.getRendererType()); System.out.println(c.getAttributes().get("name")); } }
/** * Creates a StyleClasses element and adds one entry for a sub-component with the name of the renderer. * E. g.: UITreeNode + "icon" -> tobago-treeNode-icon */ public StyleClasses(final UIComponent component, final String sub) { this(); addClass(StringUtils.uncapitalize(component.getRendererType()), sub); }
/** * @deprecated since 1.5.0, please use ThemeConfig.getMeasure() */ @Deprecated public static int getValue(final FacesContext facesContext, final UIComponent component, final String name) { Deprecation.LOG.warn("please use ThemeConfig.getMeasure()"); return ResourceManagerFactory.getResourceManager(facesContext).getThemeMeasure( facesContext, component.getRendererType(), null, name).getPixel(); }
protected static void validateRenderer(FacesContext context, UIComponent source, UIComponent component, String expression, int hints) { if (SearchExpressionUtils.isHintSet(hints, SearchExpressionHint.VALIDATE_RENDERER) && context.isProjectStage(ProjectStage.Development)) { if (ComponentUtils.isValueBlank(component.getRendererType())) { LOG.warning("Can not update component \"" + component.getClass().getName() + "\" with id \"" + component.getClientId(context) + "\" without a attached renderer. Expression \"" + expression + "\" referenced from \"" + source.getClientId(context) + "\""); } } }
static Renderer getRenderer(final FacesContext context, final UIComponent component) { final String rendererType = component.getRendererType(); if (rendererType == null) { return null; } final RenderKit renderKit = RenderKitUtil.getRenderKit(context); return renderKit.getRenderer(component.getFamily(), rendererType); }
public static Renderer getRenderer(FacesContext context, UIComponent component) { String rendererType = component.getRendererType(); if (rendererType == null) { return null; } RenderKit renderKit = RenderKitUtil.getRenderKit(context); return renderKit.getRenderer(component.getFamily(), rendererType); } }
public String getRendererType() { setupPerspective(); String rendererType = innerGetDelegate().getRendererType(); teardownPerspective(); return rendererType; }