| java.lang.Object com.sun.rave.web.ui.model.Markup
All known Subclasses: com.sun.rave.web.ui.model.ScriptMarkup,
Markup | public class Markup (Code) | | Utility bean that serves as an accumulating buffer for
well formed markup fragments typically generated by renderers.
The fundamental API is modelled after ResponseWriter
in JavaServer Faces.
|
clear | public void clear()(Code) | | Clear any accumulated markup stored in this object,
making it suitable for reuse.
|
close | protected void close()(Code) | | Close the currently open starting element, if any.
|
endElement | public void endElement(String name)(Code) | | Accumulate the end of an element, after closing any open element
created by a call to startElement() . Elements must be
closed in the inverse order from which they were opened; it is an
error to do otherwise.
Parameters: name - Name of the element to be ended exception: NullPointerException - if name is null |
getEncoding | public String getEncoding()(Code) | | Return the character encoding assumed to be used when the
markup contained in this instance is ultimately rendered.
|
getMarkup | public String getMarkup()(Code) | | Return the markup that has been accumulated in this element,
as a String suitable for direct transcription to the response
buffer.
|
hexadecimal | protected void hexadecimal(int i)(Code) | | Append the hexadecimal equivalent of the specified
numeric value.
|
hexadecimals | protected void hexadecimals(char ch)(Code) | | Append the specified character as an escaped two-hex-digit value.
Parameters: ch - Character to be escaped |
numeric | protected void numeric(char ch)(Code) | | Append a numeric escape for the specified character.
Parameters: ch - Character to be escaped |
setEncoding | public void setEncoding(String encoding)(Code) | | Set the character encoding assumed to be used when the
markup contained in this instance is ultimately rendered.
Parameters: encoding - The new character encoding |
startElement | public void startElement(String name, UIComponent component)(Code) | | Accumulate the start of a new element, up to and including
the element name. Once this method has been called, clients
can call writeAttribute() or
writeURIAttriute() to add attributes and their
corresponding values. The starting element will be closed
on any subsequent call to startElement() ,
writeComment() , writeText() ,
writeRaw() , endElement() , or
getMarkup() .
Parameters: name - Name of the element to be started Parameters: component - The UIComponent (if any)to which this element corresponds exception: NullPointerException - if name is null |
toString | public String toString()(Code) | | Return the markup that has been accumulated in this element.
This is an alias for the getMarkup() method.
|
writeAttribute | public void writeAttribute(String name, Object value, String property)(Code) | | Accumulate an attribute name and corresponding value. This
method may only be called after a call to startElement()
and before the opened element has been closed.
Parameters: name - Attribute name to be added Parameters: value - Attribute value to be added Parameters: property - Name of the component property or attribute (if any)of the UIComponent associated with the containingelement, to which the generated attribute corresponds exception: IllegalStateException - if this method is calledwhen there is no currently open element exception: NullPointerException - if name or value is null |
writeComment | public void writeComment(Object comment)(Code) | | Accumulate a comment containing the specified text, after
converting that text to a String (if necessary) and performing
any escaping appropriate for the markup language being rendered.
If there is an open element that has been created by a call to
startElement() , that element will be closed first.
Parameters: comment - Text content of the comment exception: NullPointerException - if comment is null |
writeRaw | public void writeRaw(Object raw, String property)(Code) | | Accumulate an object, after converting it to a String (if necessary)
WITHOUT performing escaping appropriate for the
markup language being rendered.
If there is an open element that has been created by a call to
startElement() , that element will be closed first.
Parameters: raw - Raw content to be written Parameters: property - Name of the component property or attribute (if any)of the UIComponent associated with the containingelement, to which the generated content corresponds exception: NullPointerException - if text is null |
writeText | public void writeText(Object text, String property)(Code) | | Accumulate an object, after converting it to a String (if necessary)
and after performing any escaping appropriate for the markup
language being rendered.
If there is an open element that has been created by a call to
startElement() , that element will be closed first.
Parameters: text - Text to be written Parameters: property - Name of the component property or attribute (if any)of the UIComponent associated with the containingelement, to which the generated attribute corresponds exception: NullPointerException - if text is null |
writeURIAttribute | public void writeURIAttribute(String name, Object value, String property)(Code) | | Accumulate an attribute name and corresponding URI value. This
method may only be called after a call to startElement()
and before the opened element has been closed.
Parameters: name - Attribute name to be added Parameters: value - Attribute value to be added Parameters: property - Name of the component property or attribute (if any)of the UIComponent associated with the containingelement, to which the generated attribute corresponds exception: IllegalStateException - if this method is calledwhen there is no currently open element exception: NullPointerException - if name or value is null |
|
|