Package com.vaadin.flow.dom
Interface ChildElementConsumer
-
- All Superinterfaces:
Consumer<Element>,Serializable
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ChildElementConsumer extends Consumer<Element>, Serializable
Callback which allows to handle request to map a client side DOM element to the serverElementinstance.- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
Node.attachExistingElement(String, Element, ChildElementConsumer)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaccept(Element child)This callback method is called when the request initiated by theNode.appendChild(Element...)method is successfully executed.default voidonError(Node<?> parent, String tag, Element previousSibling)This callback method is called when the requested client element cannot be found in the providedparentby thetagname after thepreviousSibling.
-
-
-
Method Detail
-
accept
void accept(Element child)
This callback method is called when the request initiated by theNode.appendChild(Element...)method is successfully executed.The parameter value is the element created by the request.
-
onError
default void onError(Node<?> parent, String tag, Element previousSibling)
This callback method is called when the requested client element cannot be found in the providedparentby thetagname after thepreviousSibling.- Parameters:
parent- the server side parent node, notnulltag- the tag name of the requested element, notnullpreviousSibling- the previous sibling element for the requested element, may benull
-
-