@lestard lestard released this Apr 19, 2015 · 523 commits to develop since this release

Assets 17

New Features

Commands (BETA) (#193)

You can now use Commands to encapsulate actions in the ViewModel and connect them to the View.
Each Command has a running and isExecutable property that can be used for bindings in the View. See this wiki page for a detailed description.

Mapping between Model and ViewModel (BETA) (#199)

For CRUD like applications there is now a ModelWrapper that can be used to map between the ViewModel and the Model. This way the developer can reduce the coupling between ViewModel and Model and reduce some code needed to copy values between both. See this wiki page for a detailed description.

CachedViewModelCellFactory (#179)

The new CachedViewModelCellFactory can be used to show mvvmFX Views as items in a ListView. The control of what views are visible is done by providing an observable list of ViewModels. See this wiki page for a detailed description.

initialize life cycle method for ViewModels (#185)

ViewModels can now have a life cycle method initialize too that will be automatically invoked when
the ViewModel instance was fully injected.
Please Note: This is an API breaking change. If your ViewModel already has a method with the signature public void initialize() this method will now be invoked automatically by the framework. This can be prevented by renaming the method.

ResourceBundle can be injected into the ViewModel (#176)

The ResourceBundle (if any was defined) can now be injected into the ViewModel too. For this purpose we have added the annotation @InjectResourceBundle. To use the injected ResourceBundle you can use the new initialize method (#185).

Testing Utils for public usage

We had some small testing utils for internal usage for some time that are now available for public via the new module mvvmfx-testing-utils. This includes a class for testing of garbage collection.


Some utils are moved into a new sub module

We have moved some of the utilities that where part of mvvmFX-core into a new module mvvmfx-utils. This regards to the SizeBindingBuilder and the ListenerManager that where not directly related to MVVM.

The classes have still the same package which means that the user only needs to add the new module to the projects Maven POM.xml. There are not changed in the code needed.



Two ViewModel instances where created under some conditions (#181)

When no field for the ViewModel was defined in the View there where two instances of the ViewModel created even if only one would be needed and expected.