@Override public void startElement(String name, UIComponent component) throws IOException { super.startElement(name, component); if ("form".equals(name)) { writingForm = true; } else { writingForm = false; } }
@Override public void writeAttribute(String name, Object value, String property) throws IOException { if (bufferedScript.isBuffering()) { bufferedScript.bufferAttribute(name, value, property); } else { super.writeAttribute(name, value, property); } }
@Override public void endElement(String name) throws IOException { elementsOfCurrentCommandComponent--; if (elementsOfCurrentCommandComponent <= 0) { currentCommandComponent = null; elementsOfCurrentCommandComponent = 0; } super.endElement(name); }
@Override public void writeText(Object text, String property) throws IOException { // Catch cases where no class was written to a piece of menu item content if ((parent) && (parentName != null) && (!wroteClass)) { super.writeAttribute("class", "yui3-menuitem-content", "class"); wroteClass = true; } super.writeText(text, property); } }
@Override public void endElement(String name) throws IOException { if ("input".equals(name)) { if (!wroteId) { super.writeAttribute("id", id, "id"); } } super.endElement(name); }
@Override public void startElement(String name, UIComponent component) throws IOException { super.startElement(name, component); if ((!writingIdElement) && (idElement != null) && idElement.equals(name)) { writingIdElement = true; super.writeAttribute("id", idValue, "id"); } }
/** * <p>The default behavior of this method is to * call {@link ResponseWriter#startDocument()} * on the wrapped {@link ResponseWriter} object.</p> * * @see ResponseWriter#startDocument() * @since 1.2 */ @Override public void startDocument() throws IOException { getWrapped().startDocument(); }
@Override public void write(char[] cbuf, int off, int len) throws IOException { if (bufferedScript.isBuffering()) { bufferedScript.bufferSourceCode(cbuf, off, len); } else { super.write(cbuf, off, len); } }
@Override public void writeText(Object text, UIComponent component, String property) throws IOException { if (!(hasChildren && (anchorCount == 1))) { super.writeText(text, component, property); } } }
@Override public void writeURIAttribute(String name, Object value, String property) throws IOException { if (bufferedScript.isBuffering()) { bufferedScript.bufferURIAttribute(name, value, property); } else { super.writeURIAttribute(name, value, property); } }
/** * <p>The default behavior of this method is to * call {@link ResponseWriter#writePreamble} * on the wrapped {@link ResponseWriter} object.</p> * * @see ResponseWriter#writePreamble * @since 2.2 */ @Override public void writePreamble(String preamble) throws IOException { getWrapped().writePreamble(preamble); }
@Override public void write(String str) throws IOException { super.write(str); }
@Override public void endElement(String name) throws IOException { if ("input".equalsIgnoreCase(name)) { inputElement = false; } if ("label".equalsIgnoreCase(name)) { labelElement = false; super.writeAttribute("title", title, "title"); super.writeAttribute(Styleable.STYLE, "display:none;", null); super.endElement("input"); } }
@Override public void writeText(Object text, String property) throws IOException { // JavaScript does not need to be escaped. See // https://github.com/javaserverfaces/mojarra/blob/2.2.12/jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/HtmlResponseWriter.java#L1280-L1283 // for more details. if (bufferedScript.isBuffering()) { bufferedScript.bufferSourceCode(text); } else { super.writeText(text, property); } }
@Override public void writeURIAttribute(String name, Object value, String property) throws IOException { if (!disabled) { super.writeURIAttribute(name, value, property); } } }
/** * <p>The default behavior of this method is to * call {@link ResponseWriter#writeText(char[], int, int)} * on the wrapped {@link ResponseWriter} object.</p> * * @see ResponseWriter#writeText(char[], int, int) * @since 1.2 */ @Override public void writeText(char[] text, int off, int len) throws IOException { getWrapped().writeText(text, off, len); }
@Override public void writeAttribute(String name, Object value, String property) throws IOException { if ("id".equals(name)) { if (!writingIdElement) { super.writeAttribute(name, value, property); } } else { super.writeAttribute(name, value, property); } } }
@Override public void startElement(String name, UIComponent component) throws IOException { // Prevent the JSF runtime from opening the <span> tag since the // OutputToolTipRenderer.encodeMarkupBegin(FacesContext, UIComponent) method has already written an opening // <div> tag. if (!"span".equals(name)) { super.startElement(name, component); } }
@Override public void write(String str, int off, int len) throws IOException { if (isForRenderedComponent()) { super.write(str, off, len); } }
@Override public void endElement(String name) throws IOException { // Prevent the JSF runtime from closing the </span> tag since the // OutputToolTipRenderer.encodeMarkupEnd(FacesContext, UIComponent) method will write a closing </div> tag. if (!"span".equals(name)) { super.endElement(name); } }