org.zkoss.zul

Class Include

    • Constructor Detail

      • Include

        public Include()
      • Include

        public Include(java.lang.String src)
    • Method Detail

      • 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 java.lang.String getSrc()
        Returns the src.

        Default: null.

      • setSrc

        public void setSrc(java.lang.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)
      • getMode

        public java.lang.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(java.lang.String mode)
                     throws WrongValueException
        Sets the inclusion mode.
        Parameters:
        mode - the inclusion mode: auto, instant or defer.
        Throws:
        WrongValueException
        Since:
        3.6.2
      • getEnclosingTag

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

        Default: div

        Since:
        7.0.4
      • setEnclosingTag

        public void setEnclosingTag(java.lang.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 Page getChildPage()
    Description copied from interface: Includer
    Returns the child page.
    Specified by:
    getChildPage in interface Includer
  • setChildPage

    public void setChildPage(Page page)
    Description copied from interface: Includer
    Sets the child page.

    Used only for implementing an includer component (such as Include).

    Note: the child page is actually maintained by the included page, so the implementation of this method needs only to store the page in a transient member.

    Notice that, like Includer.setRenderingResult(java.lang.String), it is called only if the included page is a ZUML document.

    Specified by:
    setChildPage in interface Includer
  • setRenderingResult

    public void setRenderingResult(java.lang.String result)
    Description copied from interface: Includer
    Sets the rendering result It is called when the child page (Includer.getChildPage()) has been rendered. The includer can then generate it to the output in the way it'd like.

    Used only for implementing an includer component (such as Include).

    Notice that, like Includer.setChildPage(org.zkoss.zk.ui.Page), it is called only if the included page is a ZUML document.

    Specified by:
    setRenderingResult in interface Includer
  • onAfterCompose

    public void onAfterCompose()
  • afterCompose

    public void afterCompose()
    Description copied from interface: AfterCompose
    Invokes after ZK loader creates this component, initializes it and composes all its children, if any.
    Specified by:
    afterCompose in interface AfterCompose
  • hasDynamicProperty

    public boolean hasDynamicProperty(java.lang.String name)
    Returns whether a dynamic property is defined.
    Specified by:
    hasDynamicProperty in interface DynamicPropertied
  • setDynamicProperty

    public void setDynamicProperty(java.lang.String name,
                          java.lang.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 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 Component
    Overrides:
    invalidate in class AbstractComponent

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