com.vaadin.flow.component.template.internal.
Class AbstractInjectableElementInitializer
- java.lang.Object
-
- com.vaadin.flow.component.template.internal.AbstractInjectableElementInitializer
-
Direct Known Subclasses:
InjectableLitElementInitializer, InjectablePolymerElementInitializer
public abstract class AbstractInjectableElementInitializer extends Object implements Consumer<Map<String,String>>
Generic initializer logic.
For internal use only. May be renamed or removed in a future release.
Since:
Author:
Vaadin Ltd
-
-
Field Summary
Fields Modifier and Type Field and Description static String
TEXT_DATA
Represents text key which should be set to an
Element
viaElement.setText(String)
.
-
Constructor Summary
Constructors Modifier Constructor and Description protected
AbstractInjectableElementInitializer(Element element)
Creates an initializer for the
element
.
-
Method Summary
All Methods Modifier and Type Method and Description void
accept(Map<String,String> templateAttributes)
protected Element
getElement()
Returns server side element to initialize.
protected abstract boolean
isStaticAttribute(String name, String value)
Checks whether the attribute declaration is an attribute with a static value ( so it can be set on the serve side).
-
-
-
Field Detail
-
TEXT_DATA
public static final String TEXT_DATA
Represents text key which should be set to an
Element
viaElement.setText(String)
.The real attribute may not contain
"="
sign in the name so it's safe to use this special key for text value in a map.See Also:
-
-
Constructor Detail
-
AbstractInjectableElementInitializer
protected AbstractInjectableElementInitializer(Element element)
Creates an initializer for the
element
.Parameters:
element
- element to initialize
-
-
Method Detail
-
isStaticAttribute
protected abstract boolean isStaticAttribute(String name, String value)
Checks whether the attribute declaration is an attribute with a static value ( so it can be set on the serve side).
Parameters:
name
- the template attribute namevalue
- the template attribute valueReturns:
whether the attribute declaration is an attribute with a static value
-
getElement
protected Element getElement()
Returns server side element to initialize.
Returns:
the server side element to initialize
-
-