public static String prefixAttributeName(String attributeName, ResponseWriter responseWriter) { return prefixAttributeName(attributeName, XHTML_CONTENT_TYPE.equals(responseWriter.getContentType())); }
public static String prefixAttributeName(String attributeName, ResponseWriter responseWriter) { return prefixAttributeName(attributeName, XHTML_CONTENT_TYPE.equals(responseWriter.getContentType())); }
public static String prefixAttributeName(String attributeName, ResponseWriter responseWriter) { return prefixAttributeName(attributeName, XHTML_CONTENT_TYPE.equals(responseWriter.getContentType())); }
public static void renderAttribute(FacesContext facesContext, String attributeName, Object attributeValue) throws IOException { if (!shouldRenderAttribute(attributeValue)) { return; } ResponseWriter writer = facesContext.getResponseWriter(); String prefixedAttributeName = prefixAttributeName(attributeName, writer); if (Arrays.binarySearch(URI_ATTRIBUTE_NAMES, attributeName) >= 0) { writer.writeURIAttribute(prefixedAttributeName, attributeValue, null); } else if (Arrays.binarySearch(BOOLEAN_ATTRIBUTE_NAMES, attributeName) >= 0) { boolean booleanAttributeValue = Boolean.valueOf(String.valueOf(attributeValue)); if (booleanAttributeValue) { // TODO - is passing in Boolean.TRUE value documented somewhere? writer.writeAttribute(prefixedAttributeName, Boolean.TRUE, null); } } else { writer.writeAttribute(prefixedAttributeName, attributeValue, null); } }
public static void renderAttribute(FacesContext facesContext, String attributeName, Object attributeValue) throws IOException { if (!shouldRenderAttribute(attributeValue)) { return; } ResponseWriter writer = facesContext.getResponseWriter(); String prefixedAttributeName = prefixAttributeName(attributeName, writer); if (Arrays.binarySearch(URI_ATTRIBUTE_NAMES, attributeName) >= 0) { writer.writeURIAttribute(prefixedAttributeName, attributeValue, null); } else if (Arrays.binarySearch(BOOLEAN_ATTRIBUTE_NAMES, attributeName) >= 0) { boolean booleanAttributeValue = Boolean.valueOf(String.valueOf(attributeValue)); if (booleanAttributeValue) { // TODO - is passing in Boolean.TRUE value documented somewhere? writer.writeAttribute(prefixedAttributeName, Boolean.TRUE, null); } } else { writer.writeAttribute(prefixedAttributeName, attributeValue, null); } }
public static void renderAttribute(FacesContext facesContext, String attributeName, Object attributeValue) throws IOException { if (!shouldRenderAttribute(attributeValue)) { return; } ResponseWriter writer = facesContext.getResponseWriter(); String prefixedAttributeName = prefixAttributeName(attributeName, writer); if (Arrays.binarySearch(URI_ATTRIBUTE_NAMES, attributeName) >= 0) { writer.writeURIAttribute(prefixedAttributeName, attributeValue, null); } else if (Arrays.binarySearch(BOOLEAN_ATTRIBUTE_NAMES, attributeName) >= 0) { boolean booleanAttributeValue = Boolean.valueOf(String.valueOf(attributeValue)); if (booleanAttributeValue) { // TODO - is passing in Boolean.TRUE value documented somewhere? writer.writeAttribute(prefixedAttributeName, Boolean.TRUE, null); } } else { writer.writeAttribute(prefixedAttributeName, attributeValue, null); } }