/** * saves elements for adding to the head section markup if header request or render request */ public void addProperty(String key, Element element) { if (!key.equals(MimeResponse.MARKUP_HEAD_ELEMENT)) { StringBuilder txt = new StringBuilder(128); txt.append("Ignoring attempt to add document head element with key: ").append(key); txt.append(" rather than the required: ").append(MimeResponse.MARKUP_HEAD_ELEMENT); LOG.warn(txt.toString()); } else { if (!isClosed() && isSetPropsAllowed && element != null) { if (lifecycle.equals(RENDER_PHASE) || lifecycle.equals(HEADER_PHASE)) { headerData.addHeaderTag(element); } } } }