Class Apply

    • Field Detail

      • _props

        protected java.util.Map<java.lang.String,​java.lang.Object> _props
    • Constructor Detail

      • Apply

        public Apply()
    • Method Detail

      • getTemplate

        public java.lang.String getTemplate()
        Returns the template name

        Default: empty string

      • setTemplate

        public void setTemplate​(java.lang.String template)
        Sets the template name to apply.

        One cannot set both template and template URI in the same time.

        Notice that, the template enclosed with <apply> tag will be created only when both template and template URI are not set.

      • setTemplateURI

        public void setTemplateURI​(java.lang.String templateURI)
        Sets the template uri.

        If templateURI is changed, the whole shadow is recreated. One cannot set both template and template URI in the same time.

        Notice that, the template enclosed with <apply> tag will be created only when both template and template URI are not set.

        Parameters:
        templateURI - the template URI. If null or empty, nothing is applied. You can specify the template URI with the query string and they will become a map of parameters that is accessible by the arg variable in EL, or by Execution.getArg(). For example, if "/a.zul?b=c" is specified, you can access the parameter with ${arg.b} in a.zul.
        See Also:
        setDynamicProperty(java.lang.String, java.lang.Object)
      • getTemplateURI

        public java.lang.String getTemplateURI()
      • resolveTemplate

        protected Template resolveTemplate()
        Return the template, if any, the default implementation will look up the template where in its parent shadow or its shadow host.
        Returns:
        Template
      • compose

        protected void compose​(Component host)
        Composes from template name and then template uri, if any.
        Overrides:
        compose in class TemplateBasedShadowElement
        Parameters:
        host - the shadow host component, never null.
      • getDynamicProperty

        public java.lang.Object getDynamicProperty​(java.lang.String name)
        Description copied from interface: DynamicPropertied
        Returns the property value of the specified name.
        Specified by:
        getDynamicProperty in interface DynamicPropertied
      • getDynamicProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getDynamicProperties()
        Description copied from interface: DynamicPropertied
        Returns all available dynamic properties.
        Specified by:
        getDynamicProperties in interface DynamicPropertied
      • setDynamicProperty

        public void setDynamicProperty​(java.lang.String name,
                                       java.lang.Object value)
                                throws WrongValueException
        Description copied from interface: DynamicPropertied
        Sets a property with the specified name and value.

        If a component supports only String-type values, it could use org.zkoss.lang.Objects.toString() to convert the value to a String instance.

        Specified by:
        setDynamicProperty in interface DynamicPropertied
        Throws:
        WrongValueException
      • clone

        public java.lang.Object clone()
        Description copied from interface: Component
        Clones the component. All of its children and descendants are cloned. Also, ID are preserved.
        Specified by:
        clone in interface Component
        Overrides:
        clone in class TemplateBasedShadowElement
        Returns:
        the new component. Notice that it doesn't belong to any page, nor desktop. It doesn't have a parent, either.