Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move call to getMessageHandler().onResynchronize(); to right place #12178

Merged
merged 2 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ private void doSendInvocationsToServer() {
}
if (resynchronizeRequested) {
getLogger().info("Resynchronizing from server");
getMessageHandler().onResynchronize();
extraJson.put(ApplicationConstants.RESYNCHRONIZE_ID, true);
resynchronizeRequested = false;
}
Expand Down Expand Up @@ -356,7 +357,6 @@ private VLoadingIndicator getLoadingIndicator() {
* state from the server
*/
public void resynchronize() {
getMessageHandler().onResynchronize();
getLogger().info("Resynchronize from server requested");
resynchronizeRequested = true;
sendInvocationsToServer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
import com.vaadin.annotations.PreserveOnRefresh;
import com.vaadin.annotations.Push;
import com.vaadin.server.VaadinRequest;
import com.vaadin.shared.ui.ui.Transport;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.tests.util.Log;
import com.vaadin.ui.Label;

@PreserveOnRefresh
@Push
@Push(transport = Transport.WEBSOCKET_XHR)
public class PushWithPreserveOnRefresh extends AbstractReindeerTestUI {

private Log log = new Log(5);
private int times = 0;

@Override
protected void setup(VaadinRequest request) {
setTheme("valo");
// Internal parameter sent by vaadinBootstrap.js,
addComponent(new Label("window.name: " + request.getParameter("v-wn")));
addComponent(new Label("UI id: " + getUIId()));
Expand Down