Package com.vaadin.collaborationengine
Class FormManager
java.lang.Object
com.vaadin.collaborationengine.AbstractCollaborationManager
com.vaadin.collaborationengine.FormManager
- All Implemented Interfaces:
HasExpirationTimeout,Serializable
@Deprecated(since="25.3",
forRemoval=true)
public class FormManager
extends AbstractCollaborationManager
implements HasExpirationTimeout
Deprecated, for removal: This API element is subject to removal in a future version.
Collaboration Kit is superseded by Vaadin Signals. Deprecated as
of Vaadin 25.3 and to be removed in Vaadin 26.0. Use shared
signals instead.
Manager to handle form values and field highlight state. It allows to set a
value for a property and toggle the highlight of a property for a user.
Handlers can be set to react when a value changes or when the highlight
status changes.
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.collaborationengine.AbstractCollaborationManager
AbstractCollaborationManager.ActivationHandler -
Constructor Summary
ConstructorsConstructorDescriptionFormManager(ConnectionContext context, UserInfo localUser, String topicId, SerializableSupplier<CollaborationEngine> ceSupplier) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided connection context.FormManager(Component component, UserInfo localUser, String topicId) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided component. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Gets the optional expiration timeout of the field property data.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets the highlight state of the provided property name for the local user.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets the highlight state at the provided field index of the provided property name for the local user.voidsetExpirationTimeout(Duration expirationTimeout) Deprecated, for removal: This API element is subject to removal in a future version.Sets the expiration timeout of the field property data.voidsetHighlightHandler(HighlightHandler handler) Deprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked when a highlight is set.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked when a property changes value.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets the value for the provided property name.Methods inherited from class com.vaadin.collaborationengine.AbstractCollaborationManager
close, getCollaborationEngine, getLocalUser, getTopicId, onConnectionFailed, openTopicConnection, setActivationHandler
-
Constructor Details
-
FormManager
public FormManager(ConnectionContext context, UserInfo localUser, String topicId, SerializableSupplier<CollaborationEngine> ceSupplier) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided connection context.The provided user information is used to set the highlight for the local user with
highlight(String,boolean)orhighlight(String,boolean,int)(the default isfalse).- Parameters:
context- the context that manages connection status, notnulllocalUser- the information of the local user, notnulltopicId- the id of the topic to connect to, notnullceSupplier- the collaboration engine instance to use, notnull
-
FormManager
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided component.The provided user information is used to set the highlight for the local user with
highlight(String,boolean)orhighlight(String,boolean,int)(the default isfalse).- Parameters:
component- the component which holds UI access, notnulllocalUser- the information of the local user, notnulltopicId- the id of the topic to connect to, notnull
-
-
Method Details
-
setValue
Deprecated, for removal: This API element is subject to removal in a future version.Sets the value for the provided property name.- Parameters:
propertyName- the name of the property that is being set, notnullvalue- the value to set
-
highlight
Deprecated, for removal: This API element is subject to removal in a future version.Sets the highlight state of the provided property name for the local user. For properties that require a field index, this defaults to 0.- Parameters:
propertyName- the name of the property to highlight or remove highlight, notnullhighlight- the highlight state to set
-
highlight
Deprecated, for removal: This API element is subject to removal in a future version.Sets the highlight state at the provided field index of the provided property name for the local user.- Parameters:
propertyName- the name of the property to highlight or unhighlight, notnullhighlight- the highlight state to setfieldIndex- the field index to highlight or unhighlight
-
setPropertyChangeHandler
Deprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked when a property changes value.The handler accepts a
PropertyChangeHandler.PropertyChangeEventinstance as a parameter.- Parameters:
handler- the property change handler, ornullto remove an existing handler
-
setHighlightHandler
Deprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked when a highlight is set.The handler accepts a
HighlightHandler.HighlightContextinstance as a parameter and should return aRegistrationwhich will be removed when the highlight is toggled off.Replacing an existing handler will remove all registrations from the previous one.
- Parameters:
handler- the highlight handler, ornullto remove an existing handler
-
setExpirationTimeout
Deprecated, for removal: This API element is subject to removal in a future version.Sets the expiration timeout of the field property data. If set, data is cleared whenexpirationTimeouthas passed after the last connection to the related topic is closed. If set tonull, the timeout is cancelled.- Specified by:
setExpirationTimeoutin interfaceHasExpirationTimeout- Parameters:
expirationTimeout- the expiration timeout
-
getExpirationTimeout
Deprecated, for removal: This API element is subject to removal in a future version.Gets the optional expiration timeout of the field property data. An emptyOptionalis returned if no timeout it set, which means data is not cleared when there are no connected users to the related topic.- Specified by:
getExpirationTimeoutin interfaceHasExpirationTimeout- Returns:
- the expiration timeout
-