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

ModelWrapper: change model after instantiation #372

Closed
sideisra opened this issue Mar 29, 2016 · 0 comments
Closed

ModelWrapper: change model after instantiation #372

sideisra opened this issue Mar 29, 2016 · 0 comments
Milestone

Comments

@sideisra
Copy link
Contributor

The ModelWrapper operates on the model instance that has been passed when calling the constructor. In some cases it would be great to be able to exchange the model isnance with a new one.

Example:
In a client server scenario the client shows a model instance loaded from the server. Later the client updates the model because other clients have changed the data by loading the data an creating a new model instance. To show the updated data we have two options at the moment:

  1. Reload the view and reinitialize all bindings including the ModelWrapper.
  2. Copy all data from the new model instance into the old one and call reload on the ModelWrapper instance.

It would be great when ModelWrapper would support the following third option:
3. call setModel and then reload on the ModelWrapper instance

sideisra pushed a commit to sideisra/mvvmFX that referenced this issue Apr 5, 2016
…d updates data when model instance changes
sideisra pushed a commit to sideisra/mvvmFX that referenced this issue Apr 5, 2016
sideisra pushed a commit to sideisra/mvvmFX that referenced this issue Apr 5, 2016
@manuel-mauky manuel-mauky added this to the 1.5.0 milestone Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants