Class InitialPropertiesHandler
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.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitialPropertiesHandler(Registry registry) Creates a new instance connected to the given registry. -
Method Summary
Modifier and TypeMethodDescriptionvoidFlushes collected property update queue (requested to be sent from the client to the server).booleanhandlePropertyUpdate(MapProperty property) Handlespropertyupdate request before it's sent to the server via RPC.voidnodeRegistered(StateNode node) Notifies the handler about registered node.
-
Constructor Details
-
InitialPropertiesHandler
Creates a new instance connected to the given registry.- Parameters:
registry- the global registry
-
-
Method Details
-
flushPropertyUpdates
public void flushPropertyUpdates()Flushes collected property update queue (requested to be sent from the client to the server).Supposed to be called in the end of
TreeChangeProcessorchanges processing. -
nodeRegistered
Notifies the handler about registered node.The method is called for the newly created
nodewhich is registered in theStateTree.- Parameters:
node- the registered node
-
handlePropertyUpdate
Handlespropertyupdate request before it's sent to the server via RPC.The method returns
truefor thepropertywhich shouldn't be sent to the server because it's going to be handled by the handler (queued and sent later on if allowed).- Parameters:
property- property to handle- Returns:
trueif property is handled by the handler,falseotherwise
-