Class AbstractTag
- All Implemented Interfaces:
Serializable,Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.DynamicPropertied,org.zkoss.zk.ui.ext.RawId,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl
- Direct Known Subclasses:
A,Abbr,Address,Area,Article,Aside,Audio,B,Base,Bdi,Bdo,Blockquote,Body,Br,Button,Canvas,Caption,Cite,Code,Col,Colgroup,ContentTag,Data,Datalist,Dd,Del,Details,Dfn,Dialog,Div,Dl,Dt,Em,Embed,Fieldset,Figcaption,Figure,Footer,Form,H1,H2,H3,H4,H5,H6,Head,Header,Hgroup,Hr,Html,I,Iframe,Img,Input,Ins,Kbd,Label,Legend,Li,Link,Main,Map,Mark,Menu,Meta,Meter,Nav,Noscript,Object,Ol,Optgroup,Option,Output,P,Picture,Pre,Progress,Q,Raw,Rp,Rt,Ruby,S,Samp,Section,Select,Slot,Small,Source,Span,Strong,Sub,Summary,Sup,Table,Tbody,Td,Template,Tfoot,Th,Thead,Time,Title,Tr,Track,U,Ul,Var,Video,Wbr
Note: ZHTML components ignore the page listener since it handles non-deferrable event listeners
(see Deferrable).
- Author:
- tomyeh
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children, org.zkoss.zk.ui.AbstractComponent.ForwardInfo, org.zkoss.zk.ui.AbstractComponent.TargetInfo -
Field Summary
FieldsFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_CLONED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, AFTER_PARENT_CHANGED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns the accesskey of this tag.getDir()Returns the dir of this tag.getDynamicProperty(String name) Returns the dynamic property, or null if not found.getLang()Returns the lang of this tag.org.zkoss.zk.ui.sys.PropertyAccessgetPropertyAccess(String prop) Returns the CSS class.getStyle()Returns the CSS style.Returns the tabindex of this tag.getTag()Returns the tag name.getTitle()Returns the title of this tag.Returns the widget class, "zhtml.Widget".booleanhasDynamicProperty(String name) protected booleanbooleanReturns the contenteditable of this tag.booleanReturns the draggable of this tag.booleanisHidden()Returns the hidden of this tag.protected booleanReturns whether this tag is an orphan tag, i.e., it shall be in the form of <tag/>.booleanReturns the spellcheck of this tag.voidprotected voidredrawChildrenDirectly(TagRenderContext rc, org.zkoss.zk.ui.Execution exec, Writer out) Renders the children directly to the given output.protected voidrenderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) voidsetAccesskey(String accesskey) Sets the accesskey of this tag.voidsetContenteditable(boolean contenteditable) Sets the contenteditable of this tag.voidSets the dir of this tag.voidsetDraggable(boolean draggable) Sets the draggable of this tag.voidsetDynamicProperty(String name, Object value) Sets the dynamic property.voidsetHidden(boolean hidden) Sets the hidden of this tag.voidSets the lang of this tag.voidSets the CSS class.voidsetSpellcheck(boolean spellcheck) Sets the spellcheck of this tag.voidSets the CSS style.voidsetTabindex(Integer tabindex) Sets the tabindex of this tag.voidSets the title of this tag.booleansetVisible(boolean visible) Changes the visibility of this component.protected booleanWhether to hide the id attribute.toString()Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, destroyIndexCacheMap, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, disableHostChanged, enableBindingAnnotation, enableHostChanged, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getStubonlyDescendants, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isDisabledHostChanged, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onParentChanged, onWrongValue, query, queryAll, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, renderPropertiesOnly, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setStubonlyDescendants, setSubBindingAnnotationCount, setTemplate, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Field Details
-
_tagnm
The tag name.
-
-
Constructor Details
-
AbstractTag
-
AbstractTag
protected AbstractTag()
-
-
Method Details
-
getSclass
Returns the CSS class. Due to Java's limitation, we cannot use the name called getClas.Default: null (the default value depends on element).
-
setSclass
Sets the CSS class. -
getStyle
Returns the CSS style.Default: null.
-
setStyle
Sets the CSS style.Note: if display is not specified as part of style, the returned value of
AbstractComponent.isVisible()is assumed. In other words, if not visible and display is not specified as part of style, "display:none" is appended.On the other hand, if display is specified, then
setVisible(boolean)is called to reflect the visibility, if necessary. -
getAccesskey
Returns the accesskey of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setAccesskey
Sets the accesskey of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
isContenteditable
public boolean isContenteditable()Returns the contenteditable of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setContenteditable
public void setContenteditable(boolean contenteditable) throws org.zkoss.zk.ui.WrongValueException Sets the contenteditable of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
getDir
Returns the dir of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setDir
Sets the dir of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
isDraggable
public boolean isDraggable()Returns the draggable of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setDraggable
public void setDraggable(boolean draggable) throws org.zkoss.zk.ui.WrongValueException Sets the draggable of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
isHidden
public boolean isHidden()Returns the hidden of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setHidden
public void setHidden(boolean hidden) throws org.zkoss.zk.ui.WrongValueException Sets the hidden of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
getLang
Returns the lang of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setLang
Sets the lang of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
isSpellcheck
public boolean isSpellcheck()Returns the spellcheck of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setSpellcheck
public void setSpellcheck(boolean spellcheck) throws org.zkoss.zk.ui.WrongValueException Sets the spellcheck of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
getTabindex
Returns the tabindex of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setTabindex
Sets the tabindex of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
getTitle
Returns the title of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Since:
- 8.0.3
-
setTitle
Sets the title of this tag.Notice that this attribute refers to the corresponding attribute of the HTML5 specification. Hence, it would still be rendered to client-side as a DOM attribute even if the browser doesn’t support it.
- Throws:
org.zkoss.zk.ui.WrongValueException- Since:
- 8.0.3
-
getTag
Returns the tag name. -
hasDynamicProperty
- Specified by:
hasDynamicPropertyin interfaceorg.zkoss.zk.ui.ext.DynamicPropertied
-
getDynamicProperties
- Specified by:
getDynamicPropertiesin interfaceorg.zkoss.zk.ui.ext.DynamicPropertied
-
getDynamicProperty
Returns the dynamic property, or null if not found. Note: it must be a String object or null.- Specified by:
getDynamicPropertyin interfaceorg.zkoss.zk.ui.ext.DynamicPropertied
-
setDynamicProperty
public void setDynamicProperty(String name, Object value) throws org.zkoss.zk.ui.WrongValueException Sets the dynamic property. Note: it converts the value to a string object (by use ofObjects.toString(java.lang.Object)).Note: it handles the style property specially. Refer to
setStyle(java.lang.String)for details.- Specified by:
setDynamicPropertyin interfaceorg.zkoss.zk.ui.ext.DynamicPropertied- Throws:
org.zkoss.zk.ui.WrongValueException
-
shallHideId
protected boolean shallHideId()Whether to hide the id attribute.Default: false.
Some tags, such as
Html, won't generate the id attribute. They shall override this method to return true. -
setVisible
public boolean setVisible(boolean visible) Changes the visibility of this component.Note: it will adjust the style (
getStyle()) based on the visibility.- Specified by:
setVisiblein interfaceorg.zkoss.zk.ui.Component- Overrides:
setVisiblein classorg.zkoss.zk.ui.AbstractComponent- Returns:
- the previous visibility
-
getWidgetClass
Returns the widget class, "zhtml.Widget".- Specified by:
getWidgetClassin interfaceorg.zkoss.zk.ui.Component- Overrides:
getWidgetClassin classorg.zkoss.zk.ui.AbstractComponent- Since:
- 5.0.0
-
redraw
- Specified by:
redrawin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
redrawin classorg.zkoss.zk.ui.AbstractComponent- Throws:
IOException
-
redrawChildrenDirectly
protected void redrawChildrenDirectly(TagRenderContext rc, org.zkoss.zk.ui.Execution exec, Writer out) throws IOException Renders the children directly to the given output. Notice it is called only ifredraw(java.io.Writer)is going to render the content (HTML tags) directly. If it is about to generate the JavaScript codeAbstractComponent.redrawChildren(java.io.Writer)will be called instead.You have to override this method if the deriving class has additional information to render.
- Throws:
IOException- Since:
- 5.0.7
-
renderProperties
- Overrides:
renderPropertiesin classorg.zkoss.zk.ui.AbstractComponent- Throws:
IOException
-
isChildable
protected boolean isChildable()- Overrides:
isChildablein classorg.zkoss.zk.ui.AbstractComponent
-
isOrphanTag
protected boolean isOrphanTag()Returns whether this tag is an orphan tag, i.e., it shall be in the form of <tag/>.- Since:
- 5.0.8
-
getPropertyAccess
- Specified by:
getPropertyAccessin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
getPropertyAccessin classorg.zkoss.zk.ui.AbstractComponent
-
clone
- Specified by:
clonein interfaceorg.zkoss.zk.ui.Component- Overrides:
clonein classorg.zkoss.zk.ui.AbstractComponent
-
toString
- Overrides:
toStringin classorg.zkoss.zk.ui.AbstractComponent
-
getExtraCtrl
- Specified by:
getExtraCtrlin interfaceorg.zkoss.zk.ui.sys.ComponentCtrl- Overrides:
getExtraCtrlin classorg.zkoss.zk.ui.AbstractComponent
-