Package com.sun.faces.application

Examples of com.sun.faces.application.InterweavingResponse


              super.createVerbatimComponentFromBodyContent();
        String value = null;

        Object response = getFacesContext().getExternalContext().getResponse();
        if (response instanceof InterweavingResponse) {
            InterweavingResponse wrapped =
                  (InterweavingResponse) response;
            try {
                if (wrapped.isBytes()) {
                    wrapped.flushContentToWrappedResponse();
                } else if (wrapped.isChars()) {
                    char[] chars = wrapped.getChars();
                    if (null != chars && 0 < chars.length) {
                        if (null != verbatim) {
                            value = (String) verbatim.getValue();
                        }
                        verbatim = super.createVerbatimComponent();
                        if (null != value) {
                            verbatim.setValue(value + new String(chars));
                        } else {
                            verbatim.setValue(new String(chars));
                        }
                    }
                }
                wrapped.resetBuffers();
            } catch (IOException e) {
                throw new FacesException(new JspException(
                      "Can't write content above <f:view> tag"
                      + " " + e.getMessage()));
            }
View Full Code Here

TOP

Related Classes of com.sun.faces.application.InterweavingResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.