|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.zk.ui.sys.XmlContentRenderer
public class XmlContentRenderer
An implementation of ContentRenderer
that renders
the content as a Xml attribute (i.e., name="value").
Constructor Summary | |
---|---|
XmlContentRenderer()
|
Method Summary | |
---|---|
java.lang.StringBuffer |
getBuffer()
Returns the content being rendered. |
void |
render(java.lang.String name,
boolean value)
Renders a boolean property. |
void |
render(java.lang.String name,
byte value)
Renders a byte property. |
void |
render(java.lang.String name,
char value)
Renders a char property. |
void |
render(java.lang.String name,
java.util.Date value)
Renders a Date property. |
void |
render(java.lang.String name,
double value)
Renders a double property. |
void |
render(java.lang.String name,
float value)
Renders a float property. |
void |
render(java.lang.String name,
int value)
Renders a date property. |
void |
render(java.lang.String name,
long value)
Renders a long property. |
void |
render(java.lang.String name,
java.lang.Object value)
Renders an Object property. |
void |
render(java.lang.String name,
short value)
Renders a short property. |
void |
render(java.lang.String name,
java.lang.String value)
Renders a String property. |
void |
renderDirectly(java.lang.String name,
java.lang.Object value)
Renders the value by converting it to string. |
void |
renderWidgetAttributes(java.util.Map<java.lang.String,java.lang.String> attrs)
Renders every entry in attrs by use of render(String, Object) . |
void |
renderWidgetListeners(java.util.Map<java.lang.String,java.lang.String> listeners)
Renders every entry in listeners by use of render(String, Object) . |
void |
renderWidgetOverrides(java.util.Map<java.lang.String,java.lang.String> overrides)
Renders every entry in overrides by use of render(String, Object) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XmlContentRenderer()
Method Detail |
---|
public java.lang.StringBuffer getBuffer()
public void render(java.lang.String name, java.lang.String value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, java.util.Date value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, java.lang.Object value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, int value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, long value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, short value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, byte value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, boolean value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal JavaScript
variable name.public void render(java.lang.String name, double value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, float value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void render(java.lang.String name, char value)
render
in interface ContentRenderer
name
- the property name. Note: it must be a legal XML
attribute name.public void renderDirectly(java.lang.String name, java.lang.Object value)
renderDirectly
in interface ContentRenderer
public void renderWidgetListeners(java.util.Map<java.lang.String,java.lang.String> listeners)
render(String, Object)
.
renderWidgetListeners
in interface ContentRenderer
listeners
- the map of listeners to register at the peer widget.
The key is the event name (such as onClick), and the value the code
snippet (such as this.getFellow('inf').setValue('new')
).
They are both String instances.public void renderWidgetOverrides(java.util.Map<java.lang.String,java.lang.String> overrides)
render(String, Object)
.
renderWidgetOverrides
in interface ContentRenderer
overrides
- the map of methods or properties to override the peer widget.
The key is the method name (such as setValue), and the value
must be a valid JavaScript snippet that can be evaluated to
a value. They are both instances of String.
For example, the map will be generated as follows by JsContentRenderer
:{name1: value1, name2: value2}
.public void renderWidgetAttributes(java.util.Map<java.lang.String,java.lang.String> attrs)
render(String, Object)
.
renderWidgetAttributes
in interface ContentRenderer
attrs
- the map of attributes. The key is the attribute's name,
while the value is the attribute's value. They are both instances of String.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |