Package org.zkoss.zk.ui.util
Interface Template
-
public interface Template
Represents a UI template that is used to create components.- Since:
- 6.0.0
- Author:
- tomyeh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Component[]
create(Component parent, Component insertBefore, VariableResolver resolver, Composer composer)
Creates the components defined in this template.java.util.Map<java.lang.String,java.lang.Object>
getParameters()
Returns a readonly map of the parameters that are assigned to the template.
-
-
-
Method Detail
-
create
Component[] create(Component parent, Component insertBefore, VariableResolver resolver, Composer composer)
Creates the components defined in this template.- Parameters:
parent
- the parent to assign the new component to. UnlikeExecution.createComponents(PageDefinition, Component, Map)
(but similar toExecution.createComponents(PageDefinition, Map)
), if parent is null or the parent does not belong to any page, the created components won't be attached to any page too.insertBefore
- the component that the new components shall be inserted before. If null, the new components will be appended. If insertBefore.getParent() is not the same as parent, it is ignored.resolver
- the addition variable resolver used to render the template. Ignored if null.composer
- the addition composer used to control the lifecycle. Ignored if null.- Throws:
java.lang.NullPointerException
- if parent is null
-
getParameters
java.util.Map<java.lang.String,java.lang.Object> getParameters()
Returns a readonly map of the parameters that are assigned to the template.Notice that if a parameter's value contains EL expression, it will be evaluated when this object is instantiated and assigned to a component (by use of
Component.setTemplate(java.lang.String, org.zkoss.zk.ui.util.Template)
).
-
-