org.zkoss.zhtml.impl
Class ContentTag

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zhtml.impl.AbstractTag
          extended by org.zkoss.zhtml.impl.ContentTag
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Component, DynamicPropertied, RawId, Scope, ComponentCtrl
Direct Known Subclasses:
Script, Style

public class ContentTag
extends AbstractTag

Represents a tag that shall generate the child elements directly. A typical example is Script.

Since:
5.0.8
Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zhtml.impl.AbstractTag
AbstractTag.ExtraCtrl
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
AbstractComponent.Children
 
Field Summary
 
Fields inherited from class org.zkoss.zhtml.impl.AbstractTag
_tagnm
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 
Constructor Summary
ContentTag(java.lang.String tagnm)
           
ContentTag(java.lang.String tagnm, java.lang.String content)
           
 
Method Summary
 java.lang.String getContent()
          Returns the content.
 java.lang.String getWidgetClass()
          Returns the widget class, "zhtml.Content".
protected  boolean isChildable()
          No child is allowed.
protected  void redrawChildrenDirectly(TagRenderContext rc, Execution exec, java.io.Writer out)
          Renders the children directly to the given output.
protected  void renderProperties(ContentRenderer renderer)
          Called by (ComponentCtrl.redraw(java.io.Writer)) to render the properties, excluding the enclosing tag and children.
 void setContent(java.lang.String content)
          Sets the content.
 
Methods inherited from class org.zkoss.zhtml.impl.AbstractTag
clone, getDynamicProperty, getExtraCtrl, getSclass, getStyle, getTag, hasDynamicProperty, isOrphanTag, redraw, 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, beforeParentChanged, 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, invalidate, 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

ContentTag

public ContentTag(java.lang.String tagnm)

ContentTag

public ContentTag(java.lang.String tagnm,
                  java.lang.String content)
Method Detail

getWidgetClass

public java.lang.String getWidgetClass()
Returns the widget class, "zhtml.Content".

Specified by:
getWidgetClass in interface Component
Overrides:
getWidgetClass in class AbstractTag
See Also:
Component.setWidgetClass(java.lang.String)

getContent

public java.lang.String getContent()
Returns the content.


setContent

public void setContent(java.lang.String content)
Sets the content.


isChildable

protected boolean isChildable()
No child is allowed.

Overrides:
isChildable in class AbstractTag

renderProperties

protected void renderProperties(ContentRenderer renderer)
                         throws java.io.IOException
Description copied from class: AbstractComponent
Called by (ComponentCtrl.redraw(java.io.Writer)) to render the properties, excluding the enclosing tag and children.

Default: it renders AbstractComponent.getId() if it was assigned, and event names if listened (and listed in AbstractComponent.getClientEvents()).

Note: it doesn't render AbstractComponent.getWidgetClass(), AbstractComponent.getUuid() and AbstractComponent.getMold(), which are caller's job.

Overrides:
renderProperties in class AbstractTag
Throws:
java.io.IOException

redrawChildrenDirectly

protected void redrawChildrenDirectly(TagRenderContext rc,
                                      Execution exec,
                                      java.io.Writer out)
                               throws java.io.IOException
Description copied from class: AbstractTag
Renders the children directly to the given output. Notice it is called only if AbstractTag.redraw(java.io.Writer) is going to render the content (HTML tags) directly. If it is about to generate the JavaScript code AbstractComponent.redrawChildren(java.io.Writer) will be called instead.

You have to override this method if the deriving class has additional information to render.

Overrides:
redrawChildrenDirectly in class AbstractTag
Throws:
java.io.IOException


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