public class IlvDHTMLResponseWriter extends Object
Constructor and Description |
---|
IlvDHTMLResponseWriter(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Creates an
IlvDHTMLResponseWriter . |
Modifier and Type | Method and Description |
---|---|
void |
endScriptSection()
Close a scripting section.
|
javax.faces.context.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(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
IlvDHTMLResponseWriter
.context
- The current faces context instance.component
- The current component that is being rendered.public javax.faces.context.ResponseWriter getSupport()
public void write(String s) throws IOException
s
- The string to write.IOException
public void writeJSProxyCreation(String proxyClassName) throws IOException
jsRef = new ProxyClass(jsRef);
proxyClassName
- The class name of the JavaScript proxy.IOException
public 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.IOException
public void writeJSProperty(String propertyId) throws IOException
writeJSStringProperty
instead.propertyId
- The property to set.IOException
public void writeJSProperty(String propertyId, Object value) throws IOException
writeJSStringProperty
instead.propertyId
- The property to set.value
- The property value to set.IOException
public void writeJSStringProperty(String propertyId) throws IOException
writeJSProperty
instead.propertyId
- The property to set.IOException
public void writeJSSessionAttributeStringProperty(String propertyId) throws IOException
writeJSProperty
instead.IlvDHTMLUtil.encodeNamespace
method
to handle the portlet case.propertyId
- The property to set.IOException
public void writeJSStringProperty(String propertyId, Object value) throws IOException
writeJSProperty
instead.propertyId
- The property to set.value
- The property value to set.IOException
public void writeJSURLProperty(String propertyId) throws IOException
context.getExternalContext().encodeResourceURL(url)
will be
called.propertyId
- The property to set.IOException
public 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.IOException
public void writeJSDependencyProperty(String propertyId) throws IOException
propertyId
- The ID of the property.IOException
public void writeJSColorPropertyWithoutPrefix(String propertyId) throws IOException
java.awt.Color
. propertyId
- The ID of the property.IOException
public void writeJSColorProperty(String propertyId) throws IOException
java.awt.Color
. propertyId
- The ID of the property.IOException
public 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.IOException
public void writeJSHandlerProperty(String propertyId) throws IOException
propertyId
- The ID of the property.IOException
public void writeJSHandlerProperty(String propertyId, String[] params) throws IOException
propertyId
- The property to set.params
- The array of parameters.IOException
public 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.IOException
public void writeJSBodyEventHandler(String event, String jsMethod) throws IOException
event
- The javascript event to register on the <BODY> element.jsMethod
- The method to register.IOException
public 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.IOException
public void writeJSMethodBindingProperty(String propertyId) throws IOException
propertyId
- The ID of the property.IOException
public 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.IOException
public void writeJSStringArrayProperty(String propertyId) throws IOException
propertyId
- The property to set.IOException
public void writeJSArrayProperty(String propertyId) throws IOException
writeJSStringArrayProperty
instead.propertyId
- The property to set.IOException
public void writeJSStringMapProperty(String propertyId) throws IOException
Map
for
which keys and values are String
instances.propertyId
- The property to set.IOException
public void startScriptSection() throws IOException
IOException
public void endScriptSection() throws IOException
IOException
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.