public class IlvDHTMLResponseWriter extends Object
| Constructor and Description |
|---|
IlvDHTMLResponseWriter(FacesContext context,
UIComponent component)
Creates an
IlvDHTMLResponseWriter. |
| Modifier and Type | Method and Description |
|---|---|
void |
endScriptSection()
Close a scripting section.
|
ResponseWriter |
getSupport()
Returns the support response writer.
|
void |
startScriptSection()
Starts a scripting section.
|
void |
write(String s)
Writes a string into the response writer.
|
void |
writeJSArrayProperty(String propertyId)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSBodyEventHandler(String event,
String jsMethod)
Writes javascript code to register a function as a listener to a specified
event on the <BODY> element.
|
void |
writeJSClassNameOrValueBindingRef(String refPropertyId,
String classPropertyId)
Writes the value binding expression of the
refPropertyId if the property has a value binding to it. |
void |
writeJSColorProperty(String propertyId)
Writes the JavaScript code to set on the JavaScript component proxy the
value of the property.
|
void |
writeJSColorPropertyWithoutPrefix(String propertyId)
Writes the JavaScript code to set on the JavaScript component proxy the
value of the property.
|
void |
writeJSDependencyProperty(String propertyId)
Writes the JavaScript code to set on the JavaScript component proxy the
value of the property.
|
void |
writeJSHandler(String jsHandler,
String jsCode)
Writes a JavaScript handler on the event generated by the component
jsRef. |
void |
writeJSHandler(String jsHandler,
String jsCode,
String[] params)
Writes in the current response writer the registering of a JavaScript
handler on an event.
|
void |
writeJSHandlerProperty(String propertyId)
Writes the JavaScript code to set on the JavaScript component proxy the
value of the property.
|
void |
writeJSHandlerProperty(String propertyId,
String[] params)
Writes in the current response writer the registering of a JavaScript
handler on an event.
|
void |
writeJSMethodBindingProperty(String propertyId)
Writes the method binding expression.
|
void |
writeJSPrimitiveProperty(String propertyId,
Object defaultValue)
Writes the JavaScript code to set on the JavaScript component proxy the
value of the property.
|
void |
writeJSProperty(String propertyId)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSProperty(String propertyId,
Object value)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSPropertyValueBindingRef(String propertyId)
Writes the value binding expression of the property if the property has a value binding on it.
|
void |
writeJSProxyCreation(String proxyClassName)
Writes the creation of the JavaScript proxy of the component.
|
void |
writeJSProxyCreation(String proxyClassName,
Object[] params)
Writes the creation of the JavaScript proxy of the component.
|
void |
writeJSSessionAttributeStringProperty(String propertyId)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSStringArrayProperty(String propertyId)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSStringMapProperty(String propertyId)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSStringProperty(String propertyId)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSStringProperty(String propertyId,
Object value)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
void |
writeJSURLProperty(String propertyId)
Writes in the current response writer the JavaScript setting of a property
of a component.
|
public IlvDHTMLResponseWriter(FacesContext context, UIComponent component)
IlvDHTMLResponseWriter.context - The current faces context instance.component - The current component that is being rendered.public ResponseWriter getSupport()
public void write(String s) throws IOException
s - The string to write.IOExceptionpublic void writeJSProxyCreation(String proxyClassName) throws IOException
jsRef = new ProxyClass(jsRef);proxyClassName - The class name of the JavaScript proxy.IOExceptionpublic void writeJSProxyCreation(String proxyClassName, Object[] params) throws IOException
jsRef = new ProxyClass(jsRef, param1, param2, ...);. The jsRef parameter
is implicitly declared and therefore it does not need to be included in the parameters list.proxyClassName - The class name of the JavaScript proxy.params - The parameters used in the constructor. If the parameter
is a string, the writer will generate quotes around the paramenter.IOExceptionpublic void writeJSProperty(String propertyId) throws IOException
writeJSStringProperty instead.propertyId - The property to set.IOExceptionpublic void writeJSProperty(String propertyId, Object value) throws IOException
writeJSStringProperty instead.propertyId - The property to set.value - The property value to set.IOExceptionpublic void writeJSStringProperty(String propertyId) throws IOException
writeJSProperty instead.propertyId - The property to set.IOExceptionpublic void writeJSSessionAttributeStringProperty(String propertyId) throws IOException
writeJSProperty instead.IlvDHTMLUtil.encodeNamespace method
to handle the portlet case.propertyId - The property to set.IOExceptionpublic void writeJSStringProperty(String propertyId, Object value) throws IOException
writeJSProperty instead.propertyId - The property to set.value - The property value to set.IOExceptionpublic void writeJSURLProperty(String propertyId) throws IOException
context.getExternalContext().encodeResourceURL(url) will be
called.propertyId - The property to set.IOExceptionpublic void writeJSPrimitiveProperty(String propertyId, Object defaultValue) throws IOException
propertyId - The ID of the property.defaultValue - If the current property value is this value, do not render.IOExceptionpublic void writeJSDependencyProperty(String propertyId) throws IOException
propertyId - The ID of the property.IOExceptionpublic void writeJSColorPropertyWithoutPrefix(String propertyId) throws IOException
java.awt.Color. propertyId - The ID of the property.IOExceptionpublic void writeJSColorProperty(String propertyId) throws IOException
java.awt.Color. propertyId - The ID of the property.IOExceptionpublic void writeJSHandler(String jsHandler, String jsCode) throws IOException
jsRef. The implicit parameter of the listener is 'view'.jsHandler - The name of the JavaScript handler to add.jsCode - The code that will be executed when the specified event is
sent.IOExceptionpublic void writeJSHandlerProperty(String propertyId) throws IOException
propertyId - The ID of the property.IOExceptionpublic void writeJSHandlerProperty(String propertyId, String[] params) throws IOException
propertyId - The property to set.params - The array of parameters.IOExceptionpublic void writeJSHandler(String jsHandler, String jsCode, String[] params) throws IOException
jsHandler - The event without the prefix 'on'.jsCode - The JavaScript handler.params - The array of parameters.IOExceptionpublic void writeJSBodyEventHandler(String event, String jsMethod) throws IOException
event - The javascript event to register on the <BODY> element.jsMethod - The method to register.IOExceptionpublic void writeJSPropertyValueBindingRef(String propertyId) throws IOException
null
it stores it in the session and renders the associated value binding expression.propertyId - The ID of the property.IOExceptionpublic void writeJSMethodBindingProperty(String propertyId) throws IOException
propertyId - The ID of the property.IOExceptionpublic void writeJSClassNameOrValueBindingRef(String refPropertyId, String classPropertyId) throws IOException
refPropertyId if the property has a value binding to it.
If not fallback by retrieving the classPropertyId property value and write this value instead.refPropertyId - The ID of the reference property.classPropertyId - The ID of the property that contains the class.IOExceptionpublic void writeJSStringArrayProperty(String propertyId) throws IOException
propertyId - The property to set.IOExceptionpublic void writeJSArrayProperty(String propertyId) throws IOException
writeJSStringArrayProperty instead.propertyId - The property to set.IOExceptionpublic void writeJSStringMapProperty(String propertyId) throws IOException
Map for
which keys and values are String instances.propertyId - The property to set.IOExceptionpublic void startScriptSection()
throws IOException
IOExceptionpublic void endScriptSection()
throws IOException
IOException© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.