Module org.omnifaces
Class ConditionalResponseWriter
- java.lang.Object
-
- java.io.Writer
-
- jakarta.faces.context.ResponseWriter
-
- jakarta.faces.context.ResponseWriterWrapper
-
- org.omnifaces.component.input.componentidparam.ConditionalResponseWriter
-
- All Implemented Interfaces:
FacesWrapper<ResponseWriter>,Closeable,Flushable,Appendable,AutoCloseable
public class ConditionalResponseWriter extends ResponseWriterWrapper
ResponseWriter intended to work in conjunction with theComponentIdParamcomponent.This allows rendering to proceed to the output if the current component matches any of the given ids, otherwise simply does not send anything to the output.
- Since:
- 1.1
- Author:
- Arjan Tijms
-
-
Constructor Summary
Constructors Constructor Description ConditionalResponseWriter(ResponseWriter responseWriter, FacesContext facesContext, List<String> componentIds, List<String> clientIds, boolean renderChildren)Construct conditional response writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Writerappend(char c)Writerappend(CharSequence csq)Writerappend(CharSequence csq, int start, int end)voidendCDATA()voidendDocument()voidendElement(String name)voidstartCDATA()voidstartDocument()voidstartElement(String name, UIComponent component)voidwrite(char[] cbuf)voidwrite(char[] cbuf, int off, int len)voidwrite(int c)voidwrite(String str)voidwrite(String str, int off, int len)voidwriteAttribute(String name, Object value, String property)voidwriteComment(Object comment)voidwriteText(char[] text, int off, int len)voidwriteText(Object text, UIComponent component, String property)voidwriteText(Object text, String property)voidwriteURIAttribute(String name, Object value, String property)-
Methods inherited from class jakarta.faces.context.ResponseWriterWrapper
cloneWithWriter, close, flush, getCharacterEncoding, getContentType, getWrapped, writeDoctype, writePreamble
-
Methods inherited from class java.io.Writer
nullWriter
-
-
-
-
Constructor Detail
-
ConditionalResponseWriter
public ConditionalResponseWriter(ResponseWriter responseWriter, FacesContext facesContext, List<String> componentIds, List<String> clientIds, boolean renderChildren)
Construct conditional response writer.- Parameters:
responseWriter- Response writer to be wrapped.facesContext- Involved faces context.componentIds- Component IDs.clientIds- Client IDs.renderChildren- Whether to render children.
-
-
Method Detail
-
endCDATA
public void endCDATA() throws IOException- Overrides:
endCDATAin classResponseWriterWrapper- Throws:
IOException
-
endElement
public void endElement(String name) throws IOException
- Overrides:
endElementin classResponseWriterWrapper- Throws:
IOException
-
endDocument
public void endDocument() throws IOException- Overrides:
endDocumentin classResponseWriterWrapper- Throws:
IOException
-
startCDATA
public void startCDATA() throws IOException- Overrides:
startCDATAin classResponseWriterWrapper- Throws:
IOException
-
startDocument
public void startDocument() throws IOException- Overrides:
startDocumentin classResponseWriterWrapper- Throws:
IOException
-
startElement
public void startElement(String name, UIComponent component) throws IOException
- Overrides:
startElementin classResponseWriterWrapper- Throws:
IOException
-
write
public void write(char[] cbuf, int off, int len) throws IOException- Overrides:
writein classResponseWriterWrapper- Throws:
IOException
-
writeAttribute
public void writeAttribute(String name, Object value, String property) throws IOException
- Overrides:
writeAttributein classResponseWriterWrapper- Throws:
IOException
-
writeComment
public void writeComment(Object comment) throws IOException
- Overrides:
writeCommentin classResponseWriterWrapper- Throws:
IOException
-
writeText
public void writeText(char[] text, int off, int len) throws IOException- Overrides:
writeTextin classResponseWriterWrapper- Throws:
IOException
-
writeText
public void writeText(Object text, String property) throws IOException
- Overrides:
writeTextin classResponseWriterWrapper- Throws:
IOException
-
writeText
public void writeText(Object text, UIComponent component, String property) throws IOException
- Overrides:
writeTextin classResponseWriterWrapper- Throws:
IOException
-
writeURIAttribute
public void writeURIAttribute(String name, Object value, String property) throws IOException
- Overrides:
writeURIAttributein classResponseWriterWrapper- Throws:
IOException
-
append
public Writer append(char c) throws IOException
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
public Writer append(CharSequence csq) throws IOException
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
append
public Writer append(CharSequence csq, int start, int end) throws IOException
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter- Throws:
IOException
-
write
public void write(char[] cbuf) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(int c) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(String str) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
write
public void write(String str, int off, int len) throws IOException
- Overrides:
writein classWriter- Throws:
IOException
-
-