Closed chrosim closed 3 years ago
Hi @chrosim, thanks for reporting! I couldn't reproduce the issue though.
Here's the relevant part of my code:
binder = new CollaborationBinder<>(Person.class, user);
binder.setExpirationTimeout(Duration.ZERO);
binder.setTopic(TOPIC_ID, () -> {
Person p = new Person();
p.setFirstName("default first name");
p.setLastName("default last name");
return p;
});
After closing the view and coming back, my callback runs and the returned value is used to populate my first name and last name fields.
Can you provide any more information that could help us recognize what's different in your case? A code snippet that we can use to reproduce the issue would be perfect!
Technically, the logic should go like this:
expirationTimeout
has passed since the last time the same topic had an active connection, clear the CollaborationMap
that holds the field values of CollaborationBinder
.CollaborationBinder
starts running.CollaborationMap
doesn't hold any data related to the fields, load the values from the initial bean supplier.I'm closing this issue since we haven't heard about how to reproduce it. Please leave a comment here or open a new issue in case there's still something we could look into.
When using setExpirationTimeout on CollaborationBinder the CollaborationBinderMap is cleared in the Topic after reentering. This leads to an empty state on all fields bound to the CollaborationBinder.
I expect the CollaborationBinder to call the initialBeanSupplier when reentering a topic(which will have a cleared state) to show the actual persisted object and not an empty form.
Versions