Package com.vaadin.client.flow.binding
Interface BinderContext
-
public interface BinderContextBinder context which is passed to theBindingStrategyinstances enabling them to delegate the creation of any child nodes.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbind(StateNode stateNode, elemental.dom.Node node)Binds a DOM node for the given state node.elemental.dom.NodecreateAndBind(StateNode node)Creates and binds a DOM node for the given state node.<T extends BindingStrategy<?>>
JsArray<T>getStrategies(Predicate<BindingStrategy<?>> predicate)Gets the strategies with a specific typeTusing filteringpredicate.
-
-
-
Method Detail
-
createAndBind
elemental.dom.Node createAndBind(StateNode node)
Creates and binds a DOM node for the given state node. For state nodes based on templates, the root element of the template is returned.- Parameters:
node- the state node for which to create a DOM node, notnull- Returns:
- the DOM node, not
null
-
bind
void bind(StateNode stateNode, elemental.dom.Node node)
Binds a DOM node for the given state node.- Parameters:
stateNode- the state node to bind, notnullnode- the DOM node, notnull
-
getStrategies
<T extends BindingStrategy<?>> JsArray<T> getStrategies(Predicate<BindingStrategy<?>> predicate)
Gets the strategies with a specific typeTusing filteringpredicate.Predicate normally should be based on
Class<T>#isInstance()but this method is not available in GWT so predicateinstanceof Tshould be used. It's the developer responsibility to make sure that the resulting strategies types are correct to avoidClassCastException.- Type Parameters:
T- the array type- Parameters:
predicate- predicate to filter strategies using typeT.- Returns:
- collection of filtered strategies
-
-