Skip navigation links
org.zkoss.zul

Class Include

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

        org.zkoss.zk.ui.AbstractComponent.Children
    • Field Summary

      • Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        _zclass
      • 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_PAGE_ATTACHED, AFTER_PAGE_DETACHED, 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 and Description
      void afterCompose() 
      void clearDynamicProperties()
      Removes all dynamic properties.
      void detach() 
      org.zkoss.zk.ui.Page getChildPage() 
      Object getDynamicProperty(String name)
      Returns the parameter associated with the specified name, or null if not found.
      String getEnclosingTag()
      Returns the name of the enclosing tag.
      String getMode()
      Returns the inclusion mode.
      boolean getProgressing()
      Returns whether to show the MZul.PLEASE_WAIT message before a long operation.
      String getSrc()
      Returns the src.
      boolean hasDynamicProperty(String name)
      Returns whether a dynamic property is defined.
      void invalidate()
      Invalidates this component.
      protected boolean isChildable()
      Default: not childable.
      boolean isComment()
      Returns whether to generate the included content inside the HTML comment.
      boolean isLocalized()
      Returns whether the source depends on the current Locale.
      void onAfterCompose() 
      void onEchoInclude()
      Internal use only.
      void onPageAttached(org.zkoss.zk.ui.Page newpage, org.zkoss.zk.ui.Page oldpage) 
      protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) 
      void setChildPage(org.zkoss.zk.ui.Page page) 
      void setComment(boolean comment)
      Sets whether to generate the included content inside the HTML comment.
      void setDynamicProperty(String name, Object value)
      Adds a dynamic property that will be passed to the included page via the request's attribute.
      void setEnclosingTag(String tag)
      Sets the the name of the enclosing tag
      void setLocalized(boolean localized)
      Sets whether the source depends on the current Locale.
      void setMode(String mode)
      Sets the inclusion mode.
      void setProgressing(boolean progressing)
      Sets whether to show the MZul.PLEASE_WAIT message before a long operation.
      void setRenderingResult(String result) 
      void setSrc(String src)
      Sets the src.
      • Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
      • Methods inherited from class org.zkoss.zk.ui.AbstractComponent

        addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, 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, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
      • Methods inherited from interface org.zkoss.zk.ui.IdSpace

        getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, hasFellow, hasFellow
      • Methods inherited from interface org.zkoss.zk.ui.ext.Scope

        addScopeListener, getAttribute, getAttribute, getAttributes, hasAttribute, hasAttribute, removeAttribute, removeAttribute, removeScopeListener, setAttribute, setAttribute
    • Constructor Detail

      • Include

        public Include()
      • Include

        public Include(String src)
    • Method Detail

      • setProgressing

        public void setProgressing(boolean progressing)
        Sets whether to show the MZul.PLEASE_WAIT message before a long operation. This implementation will automatically use an echo event like Events.echoEvent(String, org.zkoss.zk.ui.Component, String) to suspend the including progress before using the Clients.showBusy(String) method to show the MZul.PLEASE_WAIT message at client side.

        If setProgressing(true) is called, the defer mode is enabled automatically if the current mode is auto.

        Default: false.

        Since:
        3.0.4
      • getProgressing

        public boolean getProgressing()
        Returns whether to show the MZul.PLEASE_WAIT message before a long operation.

        Default: false.

        Since:
        3.0.4
      • onEchoInclude

        public void onEchoInclude()
        Internal use only.
        Since:
        3.0.4
      • getSrc

        public String getSrc()
        Returns the src.

        Default: null.

      • setSrc

        public void setSrc(String src)
        Sets the src.

        If src is changed, the whole component is invalidate. Thus, you want to smart-update, you have to override this method.

        Parameters:
        src - the source URI. If null or empty, nothing is included. You can specify the source URI with the query string and they will become a parameter that can be accessed by use of Execution.getParameter(java.lang.String) or javax.servlet.ServletRequest's getParameter. For example, if "/a.zul?b=c" is specified, you can access the parameter with ${param.b} in a.zul.
        See Also:
        setDynamicProperty(java.lang.String, java.lang.Object)
      • detach

        public void detach()
        Specified by:
        detach in interface org.zkoss.zk.ui.Component
        Overrides:
        detach in class org.zkoss.zk.ui.AbstractComponent
      • getMode

        public String getMode()
        Returns the inclusion mode. There are three modes: auto, instant and defer. The behavior prior to 3.6.2 is the same as the defer mode.

        Default: auto (since 5.0.0).

        Since:
        3.6.2
      • setMode

        public void setMode(String mode)
                     throws org.zkoss.zk.ui.WrongValueException
        Sets the inclusion mode.
        Parameters:
        mode - the inclusion mode: auto, instant or defer.
        Throws:
        org.zkoss.zk.ui.WrongValueException
        Since:
        3.6.2
      • getEnclosingTag

        public String getEnclosingTag()
        Returns the name of the enclosing tag.

        Default: div

        Since:
        7.0.4
      • setEnclosingTag

        public void setEnclosingTag(String tag)
        Sets the the name of the enclosing tag

        Default: div

        Since:
        7.0.4
      • isLocalized

        public boolean isLocalized()
        Returns whether the source depends on the current Locale. If true, it will search xxx_en_US.yyy, xxx_en.yyy and xxx.yyy for the proper content, where src is assumed to be xxx.yyy.

        Default: false;

      • setLocalized

        public void setLocalized(boolean localized)
        Sets whether the source depends on the current Locale.
      • isComment

        public boolean isComment()
        Returns whether to generate the included content inside the HTML comment.

        Default: false.

        It is useful if you want to include non-HTML content. For example,

        Then, it will generate
        <div id="uuid">
        <!--
         //the content of a.xml
        -->
        

        Notice that it is ignored in the instance mode (getMode()).

Since:
5.0.0
  • setComment

    public void setComment(boolean comment)
    Sets whether to generate the included content inside the HTML comment.
    Since:
    5.0.0
    See Also:
    isComment()
  • getChildPage

    public org.zkoss.zk.ui.Page getChildPage()
    Specified by:
    getChildPage in interface org.zkoss.zk.ui.ext.Includer
  • setChildPage

    public void setChildPage(org.zkoss.zk.ui.Page page)
    Specified by:
    setChildPage in interface org.zkoss.zk.ui.ext.Includer
  • setRenderingResult

    public void setRenderingResult(String result)
    Specified by:
    setRenderingResult in interface org.zkoss.zk.ui.ext.Includer
  • onPageAttached

    public void onPageAttached(org.zkoss.zk.ui.Page newpage,
                               org.zkoss.zk.ui.Page oldpage)
    Specified by:
    onPageAttached in interface org.zkoss.zk.ui.sys.ComponentCtrl
    Overrides:
    onPageAttached in class org.zkoss.zk.ui.AbstractComponent
  • onAfterCompose

    public void onAfterCompose()
  • afterCompose

    public void afterCompose()
    Specified by:
    afterCompose in interface org.zkoss.zk.ui.ext.AfterCompose
  • hasDynamicProperty

    public boolean hasDynamicProperty(String name)
    Returns whether a dynamic property is defined.
    Specified by:
    hasDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied
  • setDynamicProperty

    public void setDynamicProperty(String name,
                                   Object value)
    Adds a dynamic property that will be passed to the included page via the request's attribute.

    For example, if setDynamicProperty("abc", new Integer(4)) is called, then the included page can retrieved the abc property by use of ${reqestScope.abc}

    Specified by:
    setDynamicProperty in interface org.zkoss.zk.ui.ext.DynamicPropertied
    Since:
    3.0.4
  • clearDynamicProperties

    public void clearDynamicProperties()
    Removes all dynamic properties.
    Since:
    5.0.1
  • invalidate

    public void invalidate()
    Invalidates this component. It works for both the instant and defer mode. Notice that all children will be detached (the instant mode) and the page will be reloaded (and new children will be created).
    Specified by:
    invalidate in interface org.zkoss.zk.ui.Component
    Overrides:
    invalidate in class org.zkoss.zk.ui.AbstractComponent
  • isChildable

    protected boolean isChildable()
    Default: not childable.
    Overrides:
    isChildable in class org.zkoss.zk.ui.AbstractComponent

Copyright © 2020. All rights reserved.