Describe the bug
The licensing model is based on an end user quota. The default behavior for users who exceed the quota is, that the collaboration features are disabled, but the app continues to work as a single-user experience. In particular, CollaborationBinder should continue to work as the regular Binder, without the field value synchronization and field highlight features.
Currently, the user exceeding the quota can edit the form, and saving the field values back to the bean works with writeBean. However, when opening the form, the form is not populated with initial values.
To Reproduce
Steps to reproduce the behavior:
Create any kind of a form and use CollaborationBinder with it.
Provide a callback for returning the bean with initial property values for populating the fields, e.g.:
binder.setTopic("topic-id", () -> {
Person p = new Person();
p.setFirstName("first");
p.setLastName("last");
return p;
});
Start the app and open it as enough users to exceed the entire quota (including the grace period quota).
Open the form as one more user.
Notice how the fields are empty.
Expected behavior
The fields should be populated with the provided values for firstName and lastName properties.
Versions
Collaboration Engine version: 2.0-SNAPSHOT with the license checking enabled
Technical details
The bug occurs because CollaborationBinder populates the form with the callback provided to setTopic, and populating the form happens in the topic connection's activation callback. When the quota is exceeded, the topic is not activated.
To fix the issue, there needs to be a way for openTopicConnection to inform the caller that the connection failed. Another issue #14 has been created for this feature. After #14, the new API can be used to populate the form if the connection fails.
We can use CollaborationEngine::requestAccess to solve this. If the user has access, open a topic connection and do things as before, otherwise just populate the form.
Describe the bug The licensing model is based on an end user quota. The default behavior for users who exceed the quota is, that the collaboration features are disabled, but the app continues to work as a single-user experience. In particular,
CollaborationBinder
should continue to work as the regularBinder
, without the field value synchronization and field highlight features.Currently, the user exceeding the quota can edit the form, and saving the field values back to the bean works with
writeBean
. However, when opening the form, the form is not populated with initial values.To Reproduce Steps to reproduce the behavior:
CollaborationBinder
with it.Expected behavior The fields should be populated with the provided values for
firstName
andlastName
properties.Versions
2.0-SNAPSHOT
with the license checking enabledTechnical details The bug occurs because
CollaborationBinder
populates the form with the callback provided tosetTopic
, and populating the form happens in the topic connection's activation callback. When the quota is exceeded, the topic is not activated.To fix the issue, there needs to be a way foropenTopicConnection
to inform the caller that the connection failed. Another issue #14 has been created for this feature. After #14, the new API can be used to populate the form if the connection fails.We can use
CollaborationEngine::requestAccess
to solve this. If the user has access, open a topic connection and do things as before, otherwise just populate the form.