Package com.vaadin.client.flow.binding
Class SimpleElementBindingStrategy
java.lang.Object
com.vaadin.client.flow.binding.SimpleElementBindingStrategy
- All Implemented Interfaces:
BindingStrategy<elemental.dom.Element>
public class SimpleElementBindingStrategy
extends Object
implements BindingStrategy<elemental.dom.Element>
Binding strategy for a simple (not template)
Element node.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(StateNode stateNode, elemental.dom.Element htmlNode, BinderContext nodeFactory) Binds a DOM node to thestateNodeusingcontextto create and bind nodes of other types.elemental.dom.ElementCreates a DOM node for thenode.booleanisApplicable(StateNode node) Returnstrueis the strategy is applicable to thenode.static booleanneedsRebind(StateNode node) Checks whether thenodeneeds re-bind.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.client.flow.binding.BindingStrategy
getTag
-
Constructor Details
-
SimpleElementBindingStrategy
public SimpleElementBindingStrategy()
-
-
Method Details
-
create
Description copied from interface:BindingStrategyCreates a DOM node for thenode.- Specified by:
createin interfaceBindingStrategy<elemental.dom.Element>- Parameters:
node- the state node for which to create a DOM node, notnull- Returns:
- the DOM node, not
null
-
isApplicable
Description copied from interface:BindingStrategyReturnstrueis the strategy is applicable to thenode.- Specified by:
isApplicablein interfaceBindingStrategy<elemental.dom.Element>- Parameters:
node- the state node to check against of- Returns:
trueif the strategy is applicable to the node
-
bind
Description copied from interface:BindingStrategyBinds a DOM node to thestateNodeusingcontextto create and bind nodes of other types.- Specified by:
bindin interfaceBindingStrategy<elemental.dom.Element>- Parameters:
stateNode- the state node to bind, notnullhtmlNode- the DOM node, notnullnodeFactory- binder context to create and construct HTML nodes of other types
-
needsRebind
Checks whether thenodeneeds re-bind.The node needs re-bind if it was initially invisible. As a consequence such node has not be bound. It has been bound in respect to visibility feature only (partially bound). Such node needs re-bind once it becomes visible.
- Parameters:
node- the node to check- Returns:
trueif the node is not entirely bound and needs re-bind later on
-