public String getButtonIcon(FacesContext facesContext, UIComponent component) { boolean disable = (Boolean) component.getAttributes().get(OPTION_DISABLED); String buttonIcon = (String) component.getAttributes().get("buttonIcon"); if (disable) { buttonIcon = (String) component.getAttributes().get("buttonDisabledIcon"); } if (buttonIcon != null && buttonIcon.trim().length() != 0) { buttonIcon = RenderKitUtils.getResourceURL(buttonIcon, facesContext); } else { buttonIcon = disable ? CALENDAR_DISABLE_ICON_RESOURCE_NAME : CALENDAR_ICON_RESOURCE_NAME; buttonIcon = RenderKitUtils.getResourcePath(facesContext, "org.richfaces.images", buttonIcon); } return buttonIcon; }
public String getButtonIcon(FacesContext facesContext, UIComponent component) { boolean disable = (Boolean) component.getAttributes().get(OPTION_DISABLED); String buttonIcon = (String) component.getAttributes().get("buttonIcon"); if (disable) { buttonIcon = (String) component.getAttributes().get("buttonDisabledIcon"); } if (buttonIcon != null && buttonIcon.trim().length() != 0) { buttonIcon = RenderKitUtils.getResourceURL(buttonIcon, facesContext); } else { buttonIcon = disable ? CALENDAR_DISABLE_ICON_RESOURCE_NAME : CALENDAR_ICON_RESOURCE_NAME; buttonIcon = RenderKitUtils.getResourcePath(facesContext, "org.richfaces.images", buttonIcon); } return buttonIcon; }
public String getButtonIcon(FacesContext facesContext, UIComponent component) { boolean disable = (Boolean) component.getAttributes().get(OPTION_DISABLED); String buttonIcon = (String) component.getAttributes().get("buttonIcon"); if (disable) { buttonIcon = (String) component.getAttributes().get("buttonDisabledIcon"); } if (buttonIcon != null && buttonIcon.trim().length() != 0) { buttonIcon = RenderKitUtils.getResourceURL(buttonIcon, facesContext); } else { buttonIcon = disable ? CALENDAR_DISABLE_ICON_RESOURCE_NAME : CALENDAR_ICON_RESOURCE_NAME; buttonIcon = RenderKitUtils.getResourcePath(facesContext, "org.richfaces.images", buttonIcon); } return buttonIcon; }
public static void encodeImage(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass) throws IOException { writer.startElement(IMG_ELEMENT, null); writer.writeAttribute(ALT_ATTRIBUTE, "", null); writer.writeAttribute(CLASS_ATTRIBUTE, styleClass, null); writer.writeURIAttribute(SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null); writer.endElement(IMG_ELEMENT); } }
public static void encodeImage(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass) throws IOException { writer.startElement(IMG_ELEMENT, null); writer.writeAttribute(ALT_ATTRIBUTE, "", null); writer.writeAttribute(CLASS_ATTRIBUTE, styleClass, null); writer.writeURIAttribute(SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null); writer.endElement(IMG_ELEMENT); } }
public static void encodeImage(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass) throws IOException { writer.startElement(IMG_ELEMENT, null); writer.writeAttribute(ALT_ATTRIBUTE, "", null); writer.writeAttribute(CLASS_ATTRIBUTE, styleClass, null); writer.writeURIAttribute(SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null); writer.endElement(IMG_ELEMENT); } }
protected void encodeCustomIcon(FacesContext context, UIComponent component, String styleClass, String iconSource) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement(HtmlConstants.IMG_ELEMENT, component); writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass, null); writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null); writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(iconSource, context), null); writer.endElement(HtmlConstants.IMG_ELEMENT); }
protected void encodeCustomIcon(FacesContext context, UIComponent component, String styleClass, String iconSource) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement(HtmlConstants.IMG_ELEMENT, component); writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass, null); writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null); writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(iconSource, context), null); writer.endElement(HtmlConstants.IMG_ELEMENT); }
protected void encodeCustomIcon(FacesContext context, UIComponent component, String styleClass, String iconSource) throws IOException { ResponseWriter writer = context.getResponseWriter(); writer.startElement(HtmlConstants.IMG_ELEMENT, component); writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass, null); writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null); writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(iconSource, context), null); writer.endElement(HtmlConstants.IMG_ELEMENT); }
} else { String uri = RenderKitUtils.getResourceURL(itemSeparator, context); writer.startElement(HtmlConstants.IMG_ELEMENT, component); writer.writeAttribute(HtmlConstants.SRC_ATTRIBUTE, uri, null);
} else { String uri = RenderKitUtils.getResourceURL(itemSeparator, context); writer.startElement(HtmlConstants.IMG_ELEMENT, component); writer.writeAttribute(HtmlConstants.SRC_ATTRIBUTE, uri, null);
} else { String uri = RenderKitUtils.getResourceURL(itemSeparator, context); writer.startElement(HtmlConstants.IMG_ELEMENT, component); writer.writeAttribute(HtmlConstants.SRC_ATTRIBUTE, uri, null);
public void encodeTdIcon(ResponseWriter writer, FacesContext context, String classPrefix, String attrIconValue, PanelIcons.State state) throws IOException { if (!isIconRendered(attrIconValue)) { return; } writer.startElement(TD_ELEM, null); try { PanelIcons icon = PanelIcons.valueOf(attrIconValue); writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(classPrefix, state.getCssClass(icon)), null); } catch (IllegalArgumentException e) { writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix, null); if (attrIconValue != null && attrIconValue.trim().length() != 0) { writer.startElement(HtmlConstants.IMG_ELEMENT, null); writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null); writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null); writer.endElement(HtmlConstants.IMG_ELEMENT); } } writer.endElement(TD_ELEM); }
public void encodeTdIcon(ResponseWriter writer, FacesContext context, String classPrefix, String attrIconValue, PanelIcons.State state) throws IOException { if (!isIconRendered(attrIconValue)) { return; } writer.startElement(TD_ELEM, null); try { PanelIcons icon = PanelIcons.valueOf(attrIconValue); writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(classPrefix, state.getCssClass(icon)), null); } catch (IllegalArgumentException e) { writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix, null); if (attrIconValue != null && attrIconValue.trim().length() != 0) { writer.startElement(HtmlConstants.IMG_ELEMENT, null); writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null); writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null); writer.endElement(HtmlConstants.IMG_ELEMENT); } } writer.endElement(TD_ELEM); }
public void encodeTdIcon(ResponseWriter writer, FacesContext context, String classPrefix, String attrIconValue, PanelIcons.State state) throws IOException { if (!isIconRendered(attrIconValue)) { return; } writer.startElement(TD_ELEM, null); try { PanelIcons icon = PanelIcons.valueOf(attrIconValue); writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(classPrefix, state.getCssClass(icon)), null); } catch (IllegalArgumentException e) { writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix, null); if (attrIconValue != null && attrIconValue.trim().length() != 0) { writer.startElement(HtmlConstants.IMG_ELEMENT, null); writer.writeAttribute(HtmlConstants.ALT_ATTRIBUTE, "", null); writer.writeURIAttribute(HtmlConstants.SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null); writer.endElement(HtmlConstants.IMG_ELEMENT); } } writer.endElement(TD_ELEM); }
expandedIcon = context.getApplication().getResourceHandler().createResource(DOWN_ICON_URL).getRequestPath(); } else { expandedIcon = RenderKitUtils.getResourceURL(expandedIcon, context); collapsedIcon = context.getApplication().getResourceHandler().createResource(UP_ICON_URL).getRequestPath(); } else { collapsedIcon = RenderKitUtils.getResourceURL(collapsedIcon, context);
expandedIcon = context.getApplication().getResourceHandler().createResource(DOWN_ICON_URL).getRequestPath(); } else { expandedIcon = RenderKitUtils.getResourceURL(expandedIcon, context); collapsedIcon = context.getApplication().getResourceHandler().createResource(UP_ICON_URL).getRequestPath(); } else { collapsedIcon = RenderKitUtils.getResourceURL(collapsedIcon, context);
expandedIcon = context.getApplication().getResourceHandler().createResource(DOWN_ICON_URL).getRequestPath(); } else { expandedIcon = RenderKitUtils.getResourceURL(expandedIcon, context); collapsedIcon = context.getApplication().getResourceHandler().createResource(UP_ICON_URL).getRequestPath(); } else { collapsedIcon = RenderKitUtils.getResourceURL(collapsedIcon, context);
Object value = RenderKitUtils.getResourceURL(iconAttribute,facesContext); if(null != value && value.toString().length()>0) { responseWriter.writeURIAttribute("src",value,null);
Object value = RenderKitUtils.getResourceURL(iconAttribute,facesContext); if(null != value && value.toString().length()>0) { responseWriter.writeURIAttribute("src",value,null);