Package org.zkoss.zml

Class XmlNativeComponent

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.DynamicPropertied, org.zkoss.zk.ui.ext.DynamicTag, org.zkoss.zk.ui.ext.Native, org.zkoss.zk.ui.ext.NonFellow, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl

    public class XmlNativeComponent
    extends org.zkoss.zk.ui.AbstractComponent
    implements org.zkoss.zk.ui.ext.DynamicTag, org.zkoss.zk.ui.ext.Native
    A comonent used to represent XML elements that are associated with the inline namespace (http://www.zkoss.org/2005/zk/inline).

    It contains the content that shall be sent directly to client. It has three parts: prolog, children and epilog. The prolog (getPrologContent()) and epilog (getEpilogContent()) are both String.

    When this component is rendered (redraw(java.io.Writer)), it generates the prolog first, the children and then the epilog.

    Since:
    3.0.0
    Author:
    tomyeh
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  XmlNativeComponent.XmlHelper
      The HTML helper.
      • Nested 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
      • Nested classes/interfaces inherited from interface org.zkoss.zk.ui.ext.Native

        org.zkoss.zk.ui.ext.Native.Helper
    • Field Summary

      • 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

        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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDeclaredNamespace​(org.zkoss.idom.Namespace ns)  
      java.util.List<org.zkoss.idom.Namespace> getDeclaredNamespaces()  
      java.util.Map<java.lang.String,​java.lang.Object> getDynamicProperties()  
      java.lang.Object getDynamicProperty​(java.lang.String name)  
      java.lang.String getEpilogContent()  
      org.zkoss.zk.ui.ext.Native.Helper getHelper()  
      java.lang.String getPrologContent()  
      java.lang.String getTag()
      Returns the tag name, or null if plain text.
      boolean hasDynamicProperty​(java.lang.String name)  
      boolean hasTag​(java.lang.String tag)  
      void redraw​(java.io.Writer out)  
      void setDynamicProperty​(java.lang.String name, java.lang.Object value)  
      void setEpilogContent​(java.lang.String epilog)  
      void setId​(java.lang.String id)  
      void setPrologContent​(java.lang.String prolog)  
      void setTag​(java.lang.String tag)
      Sets the tag name.
      boolean setVisible​(boolean visible)  
      • 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, clone, 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, getExtraCtrl, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getForwards, getId, getIndexCacheMap, getLastChild, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getPropertyAccess, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, initIndexCacheMap, insertBefore, invalidate, isChildable, 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, renderProperties, renderPropertiesOnly, replace, response, response, response, service, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisibleDirectly, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XmlNativeComponent

        public XmlNativeComponent()
      • XmlNativeComponent

        public XmlNativeComponent​(java.lang.String tag)
    • Method Detail

      • getTag

        public java.lang.String getTag()
        Returns the tag name, or null if plain text.
      • getDeclaredNamespaces

        public java.util.List<org.zkoss.idom.Namespace> getDeclaredNamespaces()
        Specified by:
        getDeclaredNamespaces in interface org.zkoss.zk.ui.ext.Native
      • addDeclaredNamespace

        public void addDeclaredNamespace​(org.zkoss.idom.Namespace ns)
        Specified by:
        addDeclaredNamespace in interface org.zkoss.zk.ui.ext.Native
      • getPrologContent

        public java.lang.String getPrologContent()
        Specified by:
        getPrologContent in interface org.zkoss.zk.ui.ext.Native
      • setPrologContent

        public void setPrologContent​(java.lang.String prolog)
        Specified by:
        setPrologContent in interface org.zkoss.zk.ui.ext.Native
      • getEpilogContent

        public java.lang.String getEpilogContent()
        Specified by:
        getEpilogContent in interface org.zkoss.zk.ui.ext.Native
      • setEpilogContent

        public void setEpilogContent​(java.lang.String epilog)
        Specified by:
        setEpilogContent in interface org.zkoss.zk.ui.ext.Native
      • getHelper

        public org.zkoss.zk.ui.ext.Native.Helper getHelper()
        Specified by:
        getHelper in interface org.zkoss.zk.ui.ext.Native
      • setId

        public void setId​(java.lang.String id)
        Specified by:
        setId in interface org.zkoss.zk.ui.Component
        Overrides:
        setId in class org.zkoss.zk.ui.AbstractComponent
      • setVisible

        public boolean setVisible​(boolean visible)
        Specified by:
        setVisible in interface org.zkoss.zk.ui.Component
        Overrides:
        setVisible in class org.zkoss.zk.ui.AbstractComponent
      • redraw

        public void redraw​(java.io.Writer out)
                    throws java.io.IOException
        Specified by:
        redraw in interface org.zkoss.zk.ui.sys.ComponentCtrl
        Overrides:
        redraw in class org.zkoss.zk.ui.AbstractComponent
        Throws:
        java.io.IOException
      • setTag

        public void setTag​(java.lang.String tag)
                    throws org.zkoss.zk.ui.WrongValueException
        Sets the tag name.
        Specified by:
        setTag in interface org.zkoss.zk.ui.ext.DynamicTag
        Parameters:
        tag - the tag name. If null or empty, plain text is assumed.
        Throws:
        org.zkoss.zk.ui.WrongValueException
      • hasTag

        public boolean hasTag​(java.lang.String tag)
        Specified by:
        hasTag in interface org.zkoss.zk.ui.ext.DynamicTag
      • hasDynamicProperty

        public boolean hasDynamicProperty​(java.lang.String name)
        Specified by:
        hasDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied
      • getDynamicProperty

        public java.lang.Object getDynamicProperty​(java.lang.String name)
        Specified by:
        getDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied
      • getDynamicProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getDynamicProperties()
        Specified by:
        getDynamicProperties in interface org.zkoss.zk.ui.ext.DynamicPropertied
      • setDynamicProperty

        public void setDynamicProperty​(java.lang.String name,
                                       java.lang.Object value)
                                throws org.zkoss.zk.ui.WrongValueException
        Specified by:
        setDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied
        Throws:
        org.zkoss.zk.ui.WrongValueException