| java.lang.Object org.millstone.webadapter.WebPaintTarget
WebPaintTarget | public class WebPaintTarget implements PaintTarget(Code) | | User Interface Description Language Target.
author: IT Mill Ltd. version: 3.1.1 since: 3.0 |
Method Summary | |
public void | addAttribute(String name, boolean value) Adds a boolean attribute to component. | public void | addAttribute(String name, Resource value) Adds a resource attribute to component. | public void | addAttribute(String name, int value) Adds a integer attribute to component. | public void | addAttribute(String name, long value) Adds a long attribute to component. | public void | addAttribute(String name, String value) Adds a string attribute to component. | public void | addCharacterData(String text) Add CDATA node to target UIDL-tree. | public void | addSection(String sectionTagName, String sectionData) Print single text section.
Prints full text section. | public void | addText(String str) Print XML-escaped text. | public void | addUIDL(String xml) | public void | addUploadStreamVariable(VariableOwner owner, String name) Add a upload stream type variable. | public void | addVariable(VariableOwner owner, String name, String value) Add a string type variable. | public void | addVariable(VariableOwner owner, String name, int value) Add a int type variable. | public void | addVariable(VariableOwner owner, String name, boolean value) Add a boolean type variable. | public void | addVariable(VariableOwner owner, String name, String[] value) Add a string array type variable. | public void | addXMLSection(String sectionTagName, String sectionData, String namespace) | public void | close() Close the paint target. | public void | endTag(String tagName) Print element end tag. | public static String | escapeXML(String xml) Substitute the XML sensitive characters with predefined XML entities. | public static StringBuffer | escapeXML(StringBuffer xml) Substitute the XML sensitive characters with predefined XML entities. | public String | getUIDL() Get the UIDL already printed to stream. | public void | startTag(String tagName) Print element start tag. | public boolean | startTag(Paintable paintable, String tag) Print element start tag of a paintable section.
Starts a paintable section using the given tag. |
addAttribute | public void addAttribute(String name, boolean value) throws PaintException(Code) | | Adds a boolean attribute to component.
Atributes must be added before any content is written.
Parameters: name - Attribute name Parameters: value - Attribute value |
addAttribute | public void addAttribute(String name, Resource value) throws PaintException(Code) | | Adds a resource attribute to component.
Atributes must be added before any content is written.
Parameters: name - Attribute name Parameters: value - Attribute value |
addAttribute | public void addAttribute(String name, int value) throws PaintException(Code) | | Adds a integer attribute to component.
Atributes must be added before any content is written.
Parameters: name - Attribute name Parameters: value - Attribute value this object |
addAttribute | public void addAttribute(String name, long value) throws PaintException(Code) | | Adds a long attribute to component.
Atributes must be added before any content is written.
Parameters: name - Attribute name Parameters: value - Attribute value this object |
addAttribute | public void addAttribute(String name, String value) throws PaintException(Code) | | Adds a string attribute to component.
Atributes must be added before any content is written.
Parameters: name - Boolean attribute name Parameters: value - Boolean attribute value this object |
addCharacterData | public void addCharacterData(String text) throws PaintException(Code) | | Add CDATA node to target UIDL-tree.
Parameters: text - Character data to add since: 3.1 |
addSection | public void addSection(String sectionTagName, String sectionData) throws PaintException(Code) | | Print single text section.
Prints full text section. The section data is escaped from XML tags and
surrounded by XML start and end-tags.
|
addUploadStreamVariable | public void addUploadStreamVariable(VariableOwner owner, String name) throws PaintException(Code) | | Add a upload stream type variable.
Parameters: owner - Listener for variable changes Parameters: name - Variable name Parameters: value - Variable initial value Reference to this. |
addVariable | public void addVariable(VariableOwner owner, String name, String value) throws PaintException(Code) | | Add a string type variable.
Parameters: owner - Listener for variable changes Parameters: name - Variable name Parameters: value - Variable initial value Reference to this. |
addVariable | public void addVariable(VariableOwner owner, String name, int value) throws PaintException(Code) | | Add a int type variable.
Parameters: owner - Listener for variable changes Parameters: name - Variable name Parameters: value - Variable initial value Reference to this. |
addVariable | public void addVariable(VariableOwner owner, String name, boolean value) throws PaintException(Code) | | Add a boolean type variable.
Parameters: owner - Listener for variable changes Parameters: name - Variable name Parameters: value - Variable initial value Reference to this. |
addVariable | public void addVariable(VariableOwner owner, String name, String[] value) throws PaintException(Code) | | Add a string array type variable.
Parameters: owner - Listener for variable changes Parameters: name - Variable name Parameters: value - Variable initial value Reference to this. |
close | public void close() throws PaintException(Code) | | Close the paint target.
Paint target must be closed before the getUIDL()
cn be called.
Subsequent attempts to write to paint target.
If the target was already closed, call to this
function is ignored.
will generate an exception.
|
endTag | public void endTag(String tagName) throws PaintException(Code) | | Print element end tag.
If the parent tag is closed before
every child tag is closed an MillstoneException is raised.
Parameters: tag - The name of the end tag |
escapeXML | public static String escapeXML(String xml)(Code) | | Substitute the XML sensitive characters with predefined XML entities.
A new string instance where all occurrences of XML sensitivecharacters are substituted with entities. |
escapeXML | public static StringBuffer escapeXML(StringBuffer xml)(Code) | | Substitute the XML sensitive characters with predefined XML entities.
Parameters: xml - the String to be substituted A new StringBuffer instance where all occurrences of XMLsensitive characters are substituted with entities. |
getUIDL | public String getUIDL()(Code) | | Get the UIDL already printed to stream.
Paint target must be closed before the getUIDL()
cn be called.
|
startTag | public void startTag(String tagName) throws PaintException(Code) | | Print element start tag.
Todo:
Checking of input values
Parameters: tagName - The name of the start tag |
startTag | public boolean startTag(Paintable paintable, String tag) throws PaintException(Code) | | Print element start tag of a paintable section.
Starts a paintable section using the given tag. The PaintTarget may
implement a caching scheme, that checks the paintable has actually
changed or can a cached version be used instead. This method should call
the startTag method. If the Paintable is found in cache and this
function returns true it may omit the content and close the tag, in which
case cached content should be used.
Note: Web adapter does not currently implement caching and
this function always returns false.
Parameters: paintable - The paintable to start Parameters: tagName - The name of the start tag false See Also: org.millstone.base.terminal.PaintTarget#startTag(Paintable, String), See Also: #startTag(String) since: 3.1 |
|
|