Class Body

  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zhtml.impl.AbstractTag
          extended by org.zkoss.zhtml.Body
All Implemented Interfaces:, java.lang.Cloneable, Component, DynamicPropertied, RawId, Scope, ComponentCtrl

public class Body
extends AbstractTag

The BODY tag.

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zhtml.impl.AbstractTag
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
Field Summary
Fields inherited from class org.zkoss.zhtml.impl.AbstractTag
Fields inherited from interface org.zkoss.zk.ui.Component
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
Constructor Summary
Method Summary
 void beforeParentChanged(Component parent)
          Default: does nothing.
 void invalidate()
          Invalidates this component by setting the dirty flag such that it will be redraw the whole content of this component and its dependences later.
 void redraw( out)
          Redraws this component and all its descendants.
Methods inherited from class org.zkoss.zhtml.impl.AbstractTag
clone, getDynamicProperty, getExtraCtrl, getSclass, getStyle, getTag, getWidgetClass, hasDynamicProperty, isChildable, isOrphanTag, redrawChildrenDirectly, renderProperties, setDynamicProperty, setSclass, setStyle, setVisible, shallHideId, toString
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public Body()
Method Detail


public void invalidate()
Description copied from interface: Component
Invalidates this component by setting the dirty flag such that it will be redraw the whole content of this component and its dependences later. And, the widget associated with this component and all its descendant at the client will be deleted and recreated, too.

If the application is totally controlled by the server side (i.e., you don't write client codes), you rarely need to access this method.

It can be called only in the request-processing and event-processing phases. However, it is NOT allowed in the rendering phase.

Specified by:
invalidate in interface Component
invalidate in class AbstractComponent


public void redraw( out)
Description copied from class: AbstractComponent
Redraws this component and all its descendants.

Default: It uses JsContentRenderer to render all information in JavaScript codes. For devices that don't support JavaScript, it must override this method.

To generate all information, it first invokes AbstractComponent.renderProperties(org.zkoss.zk.ui.sys.ContentRenderer) to render component's properties, and then AbstractComponent.redrawChildren( to redraw children (and descendants) (by calling their AbstractComponent.redraw(

If a derived class wants to render more properties, it can override AbstractComponent.renderProperties(org.zkoss.zk.ui.sys.ContentRenderer).

If a derived class renders only a subset of its children (such as paging/cropping), it could override AbstractComponent.redrawChildren(

If a deriving class wants to do something before AbstractComponent.renderProperties(org.zkoss.zk.ui.sys.ContentRenderer), it has to override AbstractComponent.redraw(

If a deriving class doesn't want to render in JavaScript codes, it has to override AbstractComponent.redraw( with the proper implementation of ContentRenderer.

Specified by:
redraw in interface ComponentCtrl
redraw in class AbstractTag


public void beforeParentChanged(Component parent)
Description copied from class: AbstractComponent
Default: does nothing.

Specified by:
beforeParentChanged in interface ComponentCtrl
beforeParentChanged in class AbstractComponent
parent - the new parent. If null, it means detachment.
See Also:

Copyright © 2005-2011 Potix Corporation. All Rights Reserved. Logo