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.

      • onEchoInclude

        public void onEchoInclude()
        Internal use only.
      • 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.

        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).

      • setMode

        public void setMode(java.lang.String mode)
                     throws WrongValueException
        Sets the inclusion mode.
        mode - the inclusion mode: auto, instant or defer.
      • getEnclosingTag

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

        Default: div

      • setEnclosingTag

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

        Default: div

      • 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()).

  • setComment

    public void setComment(boolean comment)
    Sets whether to generate the included content inside the HTML comment.
    See Also:
  • 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 ${}

    Specified by:
    setDynamicProperty in interface DynamicPropertied
  • clearDynamicProperties

    public void clearDynamicProperties()
    Removes all dynamic properties.
  • 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
    invalidate in class AbstractComponent

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