Skip to content

Guarantee order of property synchronization #2327

Not planned

Description

As a Java developer, when properties of a server-side template model change, I want the changes to be synchronized to the client in a predictable manner so that I can better coordinate state changes and events end-to-end.

Example 1:

public interface PersonModel extends TemplateModel {
  void setName(String name);
  void setCountry(String country);
}
...
getModel().setName("Sayo");
getModel().setCountry("Nigeria");

I want Flow to guarantee that the name property change is applied on the client-side before that of country because it was changed first.

Example 2:

public interface PersonModel extends TemplateModel {
  @SyncPriority(1) void setName(String name);
  @SyncPriority(2) void setCountry(String country);
}
...
getModel().setName("Sayo");
getModel().setCountry("Nigeria");

I want Flow to guarantee that the country property change is applied on the client-side before that of name because it has a higher priority.

Conversation: https://vaadin.slack.com/archives/C6RAXJATF/p1504688403000234

Activity

  1. ghost changed the title [-]Guarantee ordering of property synchronization[/-] [+]Guarantee order of property synchronization[/+] on Sep 6, 2017
  2. added this to the Not Planned milestone on Apr 18, 2018
  3. totally-not-ai commented on Dec 5, 2026

    @totally-not-ai
    Contributor

    Closing as outdated: this concerns Polymer TemplateModel synchronization. Polymer template support is deprecated; Lit templates are the recommended approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions