public class InitialPropertiesHandler extends Object
Initial property values have to be set from the server side. Client side may have default values which override server side values and those values are sent to the server (overriding server side values). This class prevents this. Only properties that have not been set form the server are sent from the client to the server. Properties that have been set from the server overrides any client side default value.
StateTree.sendNodePropertySyncToServer(MapProperty)| Constructor and Description |
|---|
InitialPropertiesHandler(Registry registry)
Creates a new instance connected to the given registry.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flushPropertyUpdates()
Flushes collected property update queue (requested to be sent from the
client to the server).
|
boolean |
handlePropertyUpdate(MapProperty property)
Handles
property update request before it's sent to the server
via RPC. |
void |
nodeRegistered(StateNode node)
Notifies the handler about registered node.
|
public InitialPropertiesHandler(Registry registry)
registry - the global registrypublic void flushPropertyUpdates()
Supposed to be called in the end of TreeChangeProcessor changes
processing.
public void nodeRegistered(StateNode node)
The method is called for the newly created node which is
registered in the StateTree.
node - the registered nodepublic boolean handlePropertyUpdate(MapProperty property)
property update request before it's sent to the server
via RPC.
The method returns true for the property which shouldn't
be sent to the server because it's going to be handled by the handler
(queued and sent later on if allowed).
property - property to handletrue if property is handled by the handler, false
otherwiseCopyright © 2000–2019 Vaadin Ltd. All rights reserved.