|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.terminal.web.WebPaintTarget
public class WebPaintTarget
User Interface Description Language Target.
| Constructor Summary | |
|---|---|
WebPaintTarget(HttpVariableMap variableMap,
UIDLTransformerType type,
ApplicationServlet webAdapterServlet,
Theme theme)
Creates a new XMLPrintWriter, without automatic line flushing. |
|
| Method Summary | |
|---|---|
void |
addAttribute(String name,
boolean value)
Adds a boolean attribute to component. |
void |
addAttribute(String name,
int value)
Adds a integer attribute to component. |
void |
addAttribute(String name,
long value)
Adds a long attribute to component. |
void |
addAttribute(String name,
Resource value)
Adds a resource attribute to component. |
void |
addAttribute(String name,
String value)
Adds a string attribute to component. |
void |
addCharacterData(String text)
Adds CDATA node to target UIDL-tree. |
void |
addSection(String sectionTagName,
String sectionData)
Prints the single text section. |
void |
addText(String str)
Prints XML-escaped text. |
void |
addUIDL(String xml)
Adds XML directly to UIDL. |
void |
addUploadStreamVariable(VariableOwner owner,
String name)
Adds a upload stream type variable. |
void |
addVariable(VariableOwner owner,
String name,
boolean value)
Adds a boolean type variable. |
void |
addVariable(VariableOwner owner,
String name,
int value)
Adds a int type variable. |
void |
addVariable(VariableOwner owner,
String name,
String value)
Adds a string type variable. |
void |
addVariable(VariableOwner owner,
String name,
String[] value)
Adds a string array type variable. |
void |
addXMLSection(String sectionTagName,
String sectionData,
String namespace)
Adds XML section with namespace. |
void |
close()
Closes the paint target. |
void |
endTag(String tagName)
Prints element end tag. |
static String |
escapeXML(String xml)
Substitutes the XML sensitive characters with predefined XML entities. |
static StringBuffer |
escapeXML(StringBuffer xml)
Substitutes the XML sensitive characters with predefined XML entities. |
String |
getUIDL()
Gets the UIDL already printed to stream. |
boolean |
startTag(Paintable paintable,
String tag)
Prints element start tag of a paintable section. |
void |
startTag(String tagName)
Prints element start tag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebPaintTarget(HttpVariableMap variableMap,
UIDLTransformerType type,
ApplicationServlet webAdapterServlet,
Theme theme)
throws PaintException
out - A character-output stream.
PaintException| Method Detail |
|---|
public void startTag(String tagName)
throws PaintException
Todo: Checking of input values
startTag in interface PaintTargettagName - the name of the start tag.
PaintException - if the paint operation failed.
public void endTag(String tagName)
throws PaintException
endTag in interface PaintTargettagName - the name of the end tag.
PaintException - if the paint operation failed.public static String escapeXML(String xml)
xml -
public static StringBuffer escapeXML(StringBuffer xml)
xml - the String to be substituted.
public void addText(String str)
throws PaintException
addText in interface PaintTargetstr -
PaintException - if the paint operation failed.
public void addAttribute(String name,
boolean value)
throws PaintException
addAttribute in interface PaintTargetname - the Attribute name.value - the Attribute value.
PaintException - if the paint operation failed.
public void addAttribute(String name,
Resource value)
throws PaintException
addAttribute in interface PaintTargetname - the Attribute name.value - the Attribute value.
PaintException - if the paint operation failed.
public void addAttribute(String name,
int value)
throws PaintException
addAttribute in interface PaintTargetname - the Attribute name.value - the Attribute value.
PaintException - if the paint operation failed.
public void addAttribute(String name,
long value)
throws PaintException
addAttribute in interface PaintTargetname - the Attribute name.value - the Attribute value.
PaintException - if the paint operation failed.
public void addAttribute(String name,
String value)
throws PaintException
addAttribute in interface PaintTargetname - the Boolean attribute name.value - the Boolean attribute value.
PaintException - if the paint operation failed.
public void addVariable(VariableOwner owner,
String name,
String value)
throws PaintException
addVariable in interface PaintTargetowner - the Listener for variable changes.name - the Variable name.value - the Variable initial value.
PaintException - if the paint operation failed.
public void addVariable(VariableOwner owner,
String name,
int value)
throws PaintException
addVariable in interface PaintTargetowner - the Listener for variable changes.name - the Variable name.value - the Variable initial value.
PaintException - if the paint operation failed.
public void addVariable(VariableOwner owner,
String name,
boolean value)
throws PaintException
addVariable in interface PaintTargetowner - the Listener for variable changes.name - the Variable name.value - the Variable initial value.
PaintException - if the paint operation failed.
public void addVariable(VariableOwner owner,
String name,
String[] value)
throws PaintException
addVariable in interface PaintTargetowner - the Listener for variable changes.name - the Variable name.value - the Variable initial value.
PaintException - if the paint operation failed.
public void addUploadStreamVariable(VariableOwner owner,
String name)
throws PaintException
addUploadStreamVariable in interface PaintTargetowner - the Listener for variable changes.name - the Variable name.
PaintException - if the paint operation failed.
public void addSection(String sectionTagName,
String sectionData)
throws PaintException
Prints full text section. The section data is escaped from XML tags and surrounded by XML start and end-tags.
addSection in interface PaintTargetsectionTagName - the name of the tag.sectionData - the section data.
PaintException - if the paint operation failed.
public void addUIDL(String xml)
throws PaintException
addUIDL in interface PaintTargetxml - the XML to be added.
PaintException - if the paint operation failed.
public void addXMLSection(String sectionTagName,
String sectionData,
String namespace)
throws PaintException
addXMLSection in interface PaintTargetsectionTagName - the tag name.sectionData - the section data to be printed.namespace - the namespace.
PaintException - if the paint operation failed.PaintTarget.addXMLSection(String,
String, String)public String getUIDL()
getUIDL can be called.
public void close()
throws PaintException
getUIDL can 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.
PaintException - if the paint operation failed.
public boolean startTag(Paintable paintable,
String tag)
throws PaintException
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.
startTag in interface PaintTargetpaintable - the paintable to start.tag - the name of the start tag.
PaintException - if the paint operation failed.com.itmill.toolkit.terminal.PaintTarget#startTag(Paintable, String),
#startTag(String)
public void addCharacterData(String text)
throws PaintException
addCharacterData in interface PaintTargettext - the Character data to add.
PaintException - if the paint operation failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||