M
- a model class that will be used for template data propagationLitTemplate
instead. Read more details from the
Vaadin blog.@Deprecated public abstract class PolymerTemplate<M extends TemplateModel> extends AbstractTemplate<M> implements Template
JsModule
annotation and the
components should be associated with the web component element using the
@Tag
annotation.
You may use Id
annotation inside your template class for a field to
reference an element inside your template via id attribute value. Note
that the injected element will have functional limitations on the server
side.
JsModule
,
Tag
,
Id
,
Serialized FormModifier | Constructor and Description |
---|---|
|
PolymerTemplate()
Deprecated.
Creates the component that is responsible for Polymer template
functionality.
|
|
PolymerTemplate(TemplateParser parser)
Deprecated.
Creates the component that is responsible for Polymer template
functionality using the provided
parser . |
protected |
PolymerTemplate(TemplateParser parser,
VaadinService service)
Deprecated.
Creates the component that is responsible for Polymer template
functionality using the provided
parser . |
Modifier and Type | Method and Description |
---|---|
Stream<Component> |
getChildren()
Deprecated.
Gets the child components of this component.
|
getModel, getModelType, getModelType, getStateNode, initModel, isSupportedClass
addListener, fireEvent, from, get, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAttachListener
addDetachListener
public PolymerTemplate(TemplateParser parser)
parser
.parser
- a template parserprotected PolymerTemplate(TemplateParser parser, VaadinService service)
parser
.parser
- a template parserservice
- the related service instancepublic PolymerTemplate()
public Stream<Component> getChildren()
The default implementation finds child components by traversing each
child Element
tree.
If the component is injected to a PolymerTemplate using the
@Id
annotation the getChildren method will only return
children added from the server side and will not return any children
declared in the template file.
Please note that components defined using @Id
are not child
components since they are attached inside the Shadow DOM. Only components
explicitly added through methods such as HasComponents.add(com.vaadin.flow.component.Component...)
or
Node.appendChild(Element...)
are returned by this method.
getChildren
in class Component
Id
Copyright © 2022. All rights reserved.