code: protected void renderStringValue(final UIComponent component,
                                       final ResponseWriter writer,
                                       final String attributeName) throws IOException {
          if (component.getAttributes().get(attributeName) != null
                  && StringUtils.isNotEmpty(component.getAttributes().get(attributeName).toString())
                  && shouldRenderAttribute(component.getAttributes().get(attributeName))) {
              writer.writeAttribute(attributeName, component.getAttributes().get(attributeName).toString().trim(), attributeName);
          }
      }
docs: Render string value if attribute is not empty.
  
  @param attributeName attribute name
  @param component     the component
  @param writer        html response writer
  @throws IOException thrown by writer