org.zkoss.zul
Class Html
java.lang.Object
org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Html
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, HtmlBasedComponent, Component, Scope, ComponentCtrl, Html, XulElement
public class Html
- extends XulElement
- implements Html
A comonent used to embed the browser native content (i.e., HTML tags)
into the output sent to the browser.
The browser native content is specified by setContent(java.lang.String).
Notice that Html generates HTML SPAN to enclose
the embedded HTML tags. Thus, you can specify the style
(HtmlBasedComponent.getStyle()), tooltip XulElement.getTooltip() and so on.
<html style="border: 1px solid blue"><![CDATA[
<ul>
<li>It is in a SPAN tag.</li>
</ul>
]]></html>
The generated HTML tags will look like:
<SPAN id="xxx" style="border: 1px solid blue">
<ul>
<li>It is in a SPAN tag.</li>
</ul>
</SPAN>
Since SPAN is used to enclosed the embedded HTML tags, so
the following is incorrect.
<html><![CDATA[
<table>
<tr>
<td> <-- Incomplete since it is inside SPAN -->
]]></html>
<textbox/>
<html><![CDATA[
</td>
</tr>
</table>
]]></html>
If you need to generate the HTML tags directly
without enclosing with SPAN, you can use the Native namespace,
http://www.zkoss.org/2005/zk/native.
Refer to the Developer's Guide for more information.
A non-XUL extension.
- Author:
- tomyeh
- See Also:
- Serialized Form
|
Constructor Summary |
Html()
Contructs a Html component to embed HTML tags. |
Html(java.lang.String content)
Contructs a Html component to embed HTML tags
with the specified content. |
|
Method Summary |
java.lang.String |
getContent()
Returns the embedded content (i.e., HTML tags). |
boolean |
isChildable()
Default: not childable. |
void |
setContent(java.lang.String content)
Sets the embedded content (i.e., HTML tags). |
| Methods inherited from class org.zkoss.zul.impl.XulElement |
getAction, getActionAttrs, getAllOnClickAttrs, getContext, getCtrlKeys, getInnerAttrs, getOuterAttrs, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
focus, getAllOnClickAttrs, getDraggable, getDroppable, getHeight, getLeft, getMoldSclass, getRealSclass, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, newExtraCtrl, redraw, setClass, setDraggable, setDroppable, setFocus, setHeight, setLeft, setMoldSclass, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Methods inherited from class org.zkoss.zk.ui.AbstractComponent |
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addMoved, addSharedAnnotationMap, addSharedEventHandlerMap, appendAsapAttr, appendAsapAttr, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getMoldURI, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, hasFellow, insertBefore, invalidate, isAsapRequired, isInvalidated, isListenerAvailable, isVisible, newChildren, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
| Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
| Methods inherited from interface org.zkoss.zk.ui.Component |
addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, redraw, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setId, setMold, setPage, setPageBefore, setParent, setVariable, setVisible, unsetVariable |
Html
public Html()
- Contructs a
Html component to embed HTML tags.
Html
public Html(java.lang.String content)
- Contructs a
Html component to embed HTML tags
with the specified content.
getContent
public java.lang.String getContent()
- Returns the embedded content (i.e., HTML tags).
Default: empty ("").
- Specified by:
getContent in interface Html
setContent
public void setContent(java.lang.String content)
- Sets the embedded content (i.e., HTML tags).
- Specified by:
setContent in interface Html
isChildable
public boolean isChildable()
- Default: not childable.
- Specified by:
isChildable in interface Component- Overrides:
isChildable in class AbstractComponent
Copyright © 2005-2009 Potix Corporation. All Rights Reserved.