com.vaadin.flow.component.polymertemplate.
Class PolymerTemplate<M extends TemplateModel>
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.polymertemplate.AbstractTemplate<M>
-
- com.vaadin.flow.component.polymertemplate.PolymerTemplate<M>
-
Type Parameters:
M
- a model class that will be used for template data propagationAll Implemented Interfaces:
AttachNotifier
,DetachNotifier
,HasElement
,DeprecatedPolymerTemplate
,Template
,Serializable
@Deprecated public abstract class PolymerTemplate<M extends TemplateModel> extends AbstractTemplate<M> implements Template
Deprecated.Polymer template support is deprecated - we recommend you to useLitTemplate
instead. Read more details from the Vaadin blog.Component for an HTML element declared as a polymer component. The HTML markup should be loaded using the
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.Since:
1.0
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Modifier Constructor 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
.
-
Method Summary
All Methods Modifier and Type Method Description Stream<Component>
getChildren()
Deprecated.
Gets the child components of this component.
-
Methods inherited from class com.vaadin.flow.component.polymertemplate.AbstractTemplate
getModel, getModelType, getModelType, getStateNode, initModel, isSupportedClass
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
-
-
-
Constructor Detail
-
PolymerTemplate
public PolymerTemplate(TemplateParser parser)
Deprecated.Creates the component that is responsible for Polymer template functionality using the provided
parser
.Parameters:
parser
- a template parser
-
PolymerTemplate
protected PolymerTemplate(TemplateParser parser, VaadinService service)
Deprecated.Creates the component that is responsible for Polymer template functionality using the provided
parser
.Parameters:
parser
- a template parserservice
- the related service instance
-
PolymerTemplate
public PolymerTemplate()
Deprecated.Creates the component that is responsible for Polymer template functionality.
-
-
Method Detail
-
getChildren
public Stream<Component> getChildren()
Deprecated.Gets the child components of this component.
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 asHasComponents.add(com.vaadin.flow.component.Component...)
orNode.appendChild(Element...)
are returned by this method.Overrides:
getChildren
in classComponent
Returns:
the child components of this component
See Also:
-
-