> R addIdentified(String fieldName, PropertyFie
return add(field);
}
}
-
- /**
- * This boolean flag indicates whether there is a difference of the data between
- * the wrapped model object and the properties provided by this wrapper.
- *
- * Note the difference to {@link #dirtyProperty()}:
- * This property will be true
if the data of the wrapped model is different to
- * the properties of this wrapper. If you change the data back to the initial state so that the data
- * is equal again, this property will change back to false
while the {@link #dirtyProperty()}
- * will still be true
.
- *
- * Simply speaking: This property indicates whether there is a difference in data between the model and the wrapper.
- * The {@link #dirtyProperty()} indicates whether there was a change done.
- *
- *
- * Note: Only those changes are observed that are done through the wrapped property fields of this wrapper.
- * If you change the data of the model instance directly, this property won't turn to true
.
- *
- *
- * @return a reay-only property indicating a difference between model and wrapper.
- */
+
+ /**
+ * This boolean flag indicates whether there is a difference of the data between the wrapped model object and the
+ * properties provided by this wrapper.
+ *
+ * Note the difference to {@link #dirtyProperty()}: This property will be true
if the data of the
+ * wrapped model is different to the properties of this wrapper. If you change the data back to the initial state so
+ * that the data is equal again, this property will change back to false
while the
+ * {@link #dirtyProperty()} will still be true
.
+ *
+ * Simply speaking: This property indicates whether there is a difference in data between the model and the wrapper.
+ * The {@link #dirtyProperty()} indicates whether there was a change done.
+ *
+ *
+ * Note: Only those changes are observed that are done through the wrapped property fields of this wrapper. If you
+ * change the data of the model instance directly, this property won't turn to true
.
+ *
+ *
+ * @return a reay-only property indicating a difference between model and wrapper.
+ */
public ReadOnlyBooleanProperty differentProperty() {
return diffFlag.getReadOnlyProperty();
}
-
- /**
- * See {@link #differentProperty()}.
- */
+
+ /**
+ * See {@link #differentProperty()}.
+ */
public boolean isDifferent() {
return diffFlag.get();
}
-
- /**
- * This boolean flag indicates whether there was a change to at least one wrapped property.
- *
- * Note the difference to {@link #differentProperty()}:
- * This property will turn to true
when the value of one of the wrapped properties is
- * changed. It will only change back to false
when either the {@link #commit()} or {@link #reload()}
- * method is called.
- * This property will stay true
even if afterwards another change is done so that the
- * data is equal again. In this case the {@link #differentProperty()} will switch back to false
.
- *
- * Simply speaking: This property indicates whether there was a change done to the wrapped properties or not.
- * The {@link #differentProperty()} indicates whether there is a difference in data at the moment.
- *
- * @return a read only boolean property indicating if there was a change done.
- */
+
+ /**
+ * This boolean flag indicates whether there was a change to at least one wrapped property.
+ *
+ * Note the difference to {@link #differentProperty()}: This property will turn to true
when the value
+ * of one of the wrapped properties is changed. It will only change back to false
when either the
+ * {@link #commit()} or {@link #reload()} method is called. This property will stay true
even if
+ * afterwards another change is done so that the data is equal again. In this case the {@link #differentProperty()}
+ * will switch back to false
.
+ *
+ * Simply speaking: This property indicates whether there was a change done to the wrapped properties or not. The
+ * {@link #differentProperty()} indicates whether there is a difference in data at the moment.
+ *
+ * @return a read only boolean property indicating if there was a change done.
+ */
public ReadOnlyBooleanProperty dirtyProperty() {
return dirtyFlag.getReadOnlyProperty();
}
-
- /**
- * See {@link #dirtyProperty()}.
- */
+
+ /**
+ * See {@link #dirtyProperty()}.
+ */
public boolean isDirty() {
return dirtyFlag.get();
}
-
-
+
+
}
diff --git a/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_FxmlView_Test.java b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_FxmlView_Test.java
index 23af3ed48..6d17c6812 100644
--- a/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_FxmlView_Test.java
+++ b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_FxmlView_Test.java
@@ -17,7 +17,6 @@
import de.saxsys.mvvmfx.FluentViewLoader;
import de.saxsys.mvvmfx.InjectViewModel;
-import de.saxsys.mvvmfx.MvvmFX;
import de.saxsys.mvvmfx.ViewModel;
import de.saxsys.mvvmfx.ViewTuple;
import de.saxsys.mvvmfx.internal.viewloader.example.*;
@@ -26,7 +25,6 @@
import javafx.fxml.LoadException;
import javafx.scene.layout.VBox;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -35,8 +33,8 @@
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
-import static org.assertj.core.api.Assertions.assertThat;
import static de.saxsys.mvvmfx.internal.viewloader.ResourceBundleAssert.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
/**
@@ -63,7 +61,7 @@ public void testLoadFxmlViewTuple() throws IOException {
final ViewTuple viewTuple = FluentViewLoader.fxmlView(TestFxmlView.class)
.resourceBundle(resourceBundle).load();
-
+
assertThat(viewTuple).isNotNull();
assertThat(viewTuple.getView()).isNotNull().isInstanceOf(VBox.class);
@@ -91,7 +89,7 @@ public void test_initializeOfViewModel() {
final ViewTuple viewTuple = FluentViewLoader
.fxmlView(TestFxmlViewResourceBundle.class)
.resourceBundle(resourceBundle).load();
-
+
// then
assertThat(TestViewModelWithResourceBundle.wasInitialized).isTrue();
assertThat(TestViewModelWithResourceBundle.resourceBundleWasAvailableAtInitialize).isTrue();
@@ -111,7 +109,7 @@ public void testBugMultipleViewModelsCreated() {
final ViewTuple viewTuple = FluentViewLoader
.fxmlView(TestFxmlViewWithoutViewModelField.class).load();
-
+
assertThat(TestFxmlViewWithoutViewModelField.instanceCounter).isEqualTo(1);
assertThat(TestViewModel.instanceCounter).isEqualTo(1);
}
@@ -128,7 +126,7 @@ public void testViewWithoutViewModelType() {
final TestFxmlViewWithoutViewModelType codeBehind = (TestFxmlViewWithoutViewModelType) viewTuple
.getCodeBehind();
-
+
assertThat(codeBehind.wasInitialized).isTrue();
}
@@ -138,7 +136,7 @@ public void testViewWithFxRoot() {
ViewTuple viewTuple = FluentViewLoader.fxmlView(
TestFxmlViewFxRoot.class).codeBehind(root).root(root).load();
-
+
assertThat(viewTuple).isNotNull();
assertThat(viewTuple.getView()).isNotNull().isEqualTo(root);
@@ -158,7 +156,7 @@ public void testUseExistingCodeBehind() {
ViewTuple viewTuple =
FluentViewLoader.fxmlView(TestFxmlViewWithMissingController.class).codeBehind(codeBehind).load();
-
+
assertThat(viewTuple).isNotNull();
assertThat(viewTuple.getCodeBehind()).isEqualTo(codeBehind);
@@ -216,7 +214,7 @@ public void testUseExistingCodeBehindFailWhenControllerIsDefinedInFXML() {
TestFxmlView codeBehind = new TestFxmlView(); // the fxml file for this class has a fx:controller defined.
ViewTuple viewTuple = FluentViewLoader.fxmlView(TestFxmlView.class)
.codeBehind(codeBehind).load();
-
+
fail("Expected a LoadException to be thrown");
} catch (Exception e) {
assertThat(e).hasCauseInstanceOf(LoadException.class).hasMessageContaining(
@@ -236,16 +234,16 @@ public void testLoadFailNoSuchFxmlFile() {
*/
@Test
public void testAlreadyExistingViewModelShouldNotBeOverwritten() {
-
+
TestFxmlViewWithMissingController codeBehind = new TestFxmlViewWithMissingController();
-
+
TestViewModel existingViewModel = new TestViewModel();
-
+
codeBehind.viewModel = existingViewModel;
-
+
ViewTuple viewTuple = FluentViewLoader
.fxmlView(TestFxmlViewWithMissingController.class).codeBehind(codeBehind).load();
-
+
assertThat(viewTuple.getCodeBehind()).isNotNull();
assertThat(viewTuple.getCodeBehind().viewModel).isEqualTo(existingViewModel);
}
@@ -275,16 +273,45 @@ public void testThrowExceptionWhenMoreThenOneViewModelIsDefinedInFxmlView() {
}
+ @Test
+ public void testViewHasNoGenericViewModelTypeButInjectsViewModel() {
+ try {
+ FluentViewLoader.fxmlView(TestFxmlViewWithoutViewModelTypeButWithInjection.class).load();
+ fail("Expected an Exception");
+ } catch (Exception e) {
+ assertThat(ExceptionUtils.getRootCause(e)).isInstanceOf(RuntimeException.class)
+ .hasMessageContaining("but tries to inject a viewModel");
+ }
+ }
+
+
+ /**
+ * like {@link #testViewHasNoGenericViewModelTypeButInjectsViewModel()} but this time the field in the View is of
+ * type {@link ViewModel}.
+ */
+ @Test
+ public void testViewHasNoGenericViewModelTypeButInjectsViewModelOfIntefaceType() {
+ try {
+ FluentViewLoader.fxmlView(TestFxmlViewWithoutViewModelTypeButWithInjection2.class).load();
+ fail("Expected an Exception");
+ } catch (Exception e) {
+ assertThat(ExceptionUtils.getRootCause(e)).isInstanceOf(RuntimeException.class)
+ .hasMessageContaining("but tries to inject a viewModel");
+ }
+ }
+
+
@Test
public void testThrowExceptionWhenWrongViewModelTypeIsInjected() {
try {
FluentViewLoader.fxmlView(TestFxmlViewWithWrongInjectedViewModel.class).load();
fail("Expected an Exception");
} catch (Exception e) {
- assertThat(ExceptionUtils.getRootCause(e)).isInstanceOf(RuntimeException.class).hasMessageContaining("field doesn't match the generic ViewModel type ");
+ assertThat(ExceptionUtils.getRootCause(e)).isInstanceOf(RuntimeException.class)
+ .hasMessageContaining("field doesn't match the generic ViewModel type ");
}
}
-
+
/**
* The {@link InjectViewModel} annotation may only be used on fields whose Type are implementing {@link ViewModel}.
*/
@@ -334,7 +361,7 @@ public void testUseExistingViewModel() {
ViewTuple viewTupleOne = FluentViewLoader.fxmlView(TestFxmlView.class)
.viewModel(viewModel)
.load();
-
+
assertThat(viewTupleOne).isNotNull();
assertThat(viewTupleOne.getCodeBehind().getViewModel()).isEqualTo(viewModel);
@@ -344,7 +371,7 @@ public void testUseExistingViewModel() {
ViewTuple viewTupleTwo = FluentViewLoader.fxmlView(TestFxmlView.class)
.viewModel(viewModel)
.load();
-
+
assertThat(viewTupleTwo).isNotNull();
assertThat(viewTupleTwo.getViewModel()).isEqualTo(viewModel);
@@ -361,7 +388,7 @@ public void testViewModelIsAvailableInViewTupleEvenIfItIsntInjectedInTheView() {
ViewTuple viewTuple = FluentViewLoader
.fxmlView(TestFxmlViewWithoutViewModelField.class).load();
-
+
assertThat(viewTuple.getCodeBehind().wasInitialized).isTrue();
assertThat(viewTuple.getViewModel()).isNotNull();
@@ -398,7 +425,7 @@ public void testExistingViewModelWithoutInjectionInView() {
final ViewTuple viewTuple = FluentViewLoader
.fxmlView(TestFxmlViewWithoutViewModelField.class).viewModel(viewModel).load();
-
+
assertThat(viewTuple.getViewModel()).isEqualTo(viewModel);
// we need to reset the DI
diff --git a/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_JavaView_Test.java b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_JavaView_Test.java
index bcb23bf2c..d1fa2acf1 100644
--- a/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_JavaView_Test.java
+++ b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/FluentViewLoader_JavaView_Test.java
@@ -1,34 +1,27 @@
package de.saxsys.mvvmfx.internal.viewloader;
-import static de.saxsys.mvvmfx.internal.viewloader.ResourceBundleAssert.assertThat;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.fail;
-
-import java.io.StringReader;
-import java.lang.reflect.Constructor;
-import java.net.URL;
-import java.util.PropertyResourceBundle;
-import java.util.ResourceBundle;
-
-import de.saxsys.mvvmfx.FluentViewLoader;
-import de.saxsys.mvvmfx.ViewModel;
-import de.saxsys.mvvmfx.ViewTuple;
+import de.saxsys.mvvmfx.*;
+import de.saxsys.mvvmfx.internal.viewloader.example.TestViewModel;
import de.saxsys.mvvmfx.internal.viewloader.example.TestViewModelA;
import de.saxsys.mvvmfx.internal.viewloader.example.TestViewModelB;
import de.saxsys.mvvmfx.internal.viewloader.example.TestViewModelWithResourceBundle;
import de.saxsys.mvvmfx.testingutils.ExceptionUtils;
import javafx.fxml.Initializable;
import javafx.scene.layout.VBox;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import de.saxsys.mvvmfx.InjectViewModel;
-import de.saxsys.mvvmfx.JavaView;
-import de.saxsys.mvvmfx.MvvmFX;
-import de.saxsys.mvvmfx.internal.viewloader.example.TestViewModel;
+import java.io.StringReader;
+import java.lang.reflect.Constructor;
+import java.net.URL;
+import java.util.PropertyResourceBundle;
+import java.util.ResourceBundle;
+
+import static de.saxsys.mvvmfx.internal.viewloader.ResourceBundleAssert.assertThat;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.fail;
/**
@@ -139,30 +132,24 @@ class TestView implements JavaView {
}
}
-
+
/**
* It is possible to define a view without specifying a viewModel type.
*/
@Test
public void testViewWithoutViewModelType() {
class TestView extends VBox implements JavaView {
- @InjectViewModel
- public TestViewModel viewModel;
}
-
+
ViewTuple viewTuple = FluentViewLoader.javaView(TestView.class).load();
-
+
assertThat(viewTuple).isNotNull();
assertThat(viewTuple.getViewModel()).isNull();
-
+
View codeBehind = viewTuple.getCodeBehind();
assertThat(codeBehind).isNotNull().isInstanceOf(TestView.class);
-
- TestView loadedView = (TestView) codeBehind;
-
- assertThat(loadedView.viewModel).isNull();
}
-
+
/**
* The ViewModel has to be injected before the explicit initialize method is called.
*/
@@ -262,6 +249,28 @@ class TestView extends VBox implements JavaView {
}
}
+
+ /**
+ * A View without generic ViewModel type can't inject a ViewModel
+ */
+ @Test
+ public void testViewWithoutViewModelTypeButViewModelInjection() {
+ class TestView extends VBox implements JavaView {
+ @InjectViewModel
+ public TestViewModel viewModel;
+ }
+
+ try {
+ FluentViewLoader.javaView(TestView.class).load();
+ fail("Expected an Exception");
+ } catch (Exception e) {
+ Throwable rootCause = ExceptionUtils.getRootCause(e);
+ assertThat(rootCause).isInstanceOf(RuntimeException.class)
+ .hasMessageContaining("but tries to inject a viewModel");
+ }
+ }
+
+
/**
* When the ViewModel isn't injected in the view it should still be available in the ViewTuple.
*/
@@ -273,7 +282,7 @@ class TestView extends VBox implements JavaView {
ViewTuple viewTuple = FluentViewLoader
.javaView(TestView.class).load();
-
+
assertThat(viewTuple.getViewModel()).isNotNull();
}
@@ -289,7 +298,7 @@ class TestView extends VBox implements JavaView {
ViewTuple viewTuple = FluentViewLoader.javaView(TestView.class).viewModel(viewModel)
.load();
-
+
assertThat(viewTuple.getCodeBehind().viewModel).isEqualTo(viewModel);
assertThat(viewTuple.getViewModel()).isEqualTo(viewModel);
}
@@ -405,7 +414,7 @@ class TestView extends VBox implements JavaView {
TestView loadedView = FluentViewLoader.javaView(TestView.class).resourceBundle(resourceBundle).load()
.getCodeBehind();
-
+
assertThat(loadedView.resources).hasSameContent(resourceBundle);
}
@@ -427,7 +436,7 @@ public void initialize() {
TestView loadedView = FluentViewLoader.javaView(TestView.class).resourceBundle(resourceBundle).load()
.getCodeBehind();
-
+
assertThat(loadedView.resourcesWasInjected).isTrue();
}
@@ -445,7 +454,7 @@ public ResourceBundle getResources() {
TestView loadedView = FluentViewLoader.javaView(TestView.class).resourceBundle(resourceBundle).load()
.getCodeBehind();
-
+
assertThat(loadedView.getResources()).isNull();
}
@@ -461,7 +470,7 @@ class TestView extends VBox implements JavaView {
TestView loadedView = FluentViewLoader.javaView(TestView.class).resourceBundle(resourceBundle).load()
.getCodeBehind();
-
+
assertThat(loadedView.resources).isInstanceOf(ResourceBundle.class);
ResourceBundle resourceBundle = (ResourceBundle)loadedView.resources;
assertThat(resourceBundle).isNotNull().hasSameContent(resourceBundle);
@@ -480,7 +489,7 @@ class TestView extends VBox implements JavaView {
TestView loadedView = FluentViewLoader.javaView(TestView.class).resourceBundle(resourceBundle).load()
.getCodeBehind();
-
+
assertThat(loadedView.resources).isNull();
}
@@ -497,7 +506,7 @@ public void initialize(URL location, ResourceBundle resources) {
TestView loadedView = FluentViewLoader.javaView(TestView.class).resourceBundle(resourceBundle).load()
.getCodeBehind();
-
+
assertThat(loadedView.resourceBundle).hasSameContent(resourceBundle);
}
@@ -516,7 +525,7 @@ public void initialize(URL location, ResourceBundle resources) {
TestView loadedView = FluentViewLoader.javaView(TestView.class).resourceBundle(resourceBundle).load()
.getCodeBehind();
-
+
assertThat(loadedView.resources).isNull();
}
diff --git a/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection.java b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection.java
new file mode 100644
index 000000000..673c8e5de
--- /dev/null
+++ b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection.java
@@ -0,0 +1,11 @@
+package de.saxsys.mvvmfx.internal.viewloader.example;
+
+import de.saxsys.mvvmfx.FxmlView;
+import de.saxsys.mvvmfx.InjectViewModel;
+
+public class TestFxmlViewWithoutViewModelTypeButWithInjection implements FxmlView {
+
+ @InjectViewModel
+ public TestViewModel viewModel;
+
+}
diff --git a/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection2.java b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection2.java
new file mode 100644
index 000000000..db9ff434a
--- /dev/null
+++ b/mvvmfx/src/test/java/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection2.java
@@ -0,0 +1,12 @@
+package de.saxsys.mvvmfx.internal.viewloader.example;
+
+import de.saxsys.mvvmfx.FxmlView;
+import de.saxsys.mvvmfx.InjectViewModel;
+import de.saxsys.mvvmfx.ViewModel;
+
+public class TestFxmlViewWithoutViewModelTypeButWithInjection2 implements FxmlView {
+
+ @InjectViewModel
+ public ViewModel viewModel;
+
+}
diff --git a/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/ModelWrapperTest.java b/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/ModelWrapperTest.java
index 45cadbef1..a88f00182 100644
--- a/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/ModelWrapperTest.java
+++ b/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/ModelWrapperTest.java
@@ -372,9 +372,6 @@ public void testDifferentFlag() {
assertThat(personWrapper.isDifferent()).isFalse();
- nicknames.remove("captain");
- assertThat(personWrapper.isDifferent()).isTrue();
-
nicknames.remove("captain");
assertThat(personWrapper.isDifferent()).isTrue();
@@ -393,8 +390,19 @@ public void testDifferentFlag() {
personWrapper.reload();
assertThat(personWrapper.isDifferent()).isFalse();
- nicknames.add("captain");
- assertThat(personWrapper.isDifferent()).isFalse();
+ nicknames.add("captain"); // duplicate captain
+ assertThat(personWrapper.isDifferent()).isTrue();
+
+ person.getNicknames().add("captain"); // now both have 2x "captain" but the modelWrapper has no chance to realize this change in the model element...
+ // ... for this reason the different flag will still be true
+ assertThat(personWrapper.isDifferent()).isTrue();
+
+ // ... but if we add another value to the nickname-Property, the modelWrapper can react to this change
+ person.getNicknames().add("other");
+ nicknames.add("other");
+ assertThat(personWrapper.isDifferent()).isFalse();
+
+
nicknames.add("player");
assertThat(personWrapper.isDifferent()).isTrue();
@@ -455,12 +463,23 @@ public void testDifferentFlagWithFxProperties() {
nicknames.add("captain");
assertThat(personWrapper.isDifferent()).isFalse();
+
+ person.getNicknames().add("captain"); // duplicate value
+ nicknames.add("captain");
+ assertThat(personWrapper.isDifferent()).isFalse();
nicknames.add("player");
assertThat(personWrapper.isDifferent()).isTrue();
- nicknames.remove("player");
+ person.getNicknames().add("player");
+ assertThat(personWrapper.isDifferent()).isTrue(); // still true because the modelWrapper can't detect the change in the model
+
+ person.setName("luise");
+ name.set("luise"); // this triggers the recalculation of the different-flag which will now detect the previous change to the nicknames list
assertThat(personWrapper.isDifferent()).isFalse();
+
+
+
nicknames.setValue(FXCollections.observableArrayList("spectator"));
assertThat(personWrapper.isDifferent()).isTrue();
diff --git a/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/Person.java b/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/Person.java
index f882a8afc..977f29cd9 100644
--- a/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/Person.java
+++ b/mvvmfx/src/test/java/de/saxsys/mvvmfx/utils/mapping/Person.java
@@ -1,8 +1,6 @@
package de.saxsys.mvvmfx.utils.mapping;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-
+import java.util.ArrayList;
import java.util.List;
public class Person {
@@ -11,14 +9,14 @@ public class Person {
private int age;
- private ObservableList nicknames = FXCollections.observableArrayList();
+ private List nicknames = new ArrayList<>();
public List getNicknames() {
return nicknames;
}
public void setNicknames (List nicknames) {
- this.nicknames.setAll(nicknames);
+ this.nicknames = nicknames;
}
public int getAge() {
diff --git a/mvvmfx/src/test/resources/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection.fxml b/mvvmfx/src/test/resources/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection.fxml
new file mode 100644
index 000000000..5dc98c095
--- /dev/null
+++ b/mvvmfx/src/test/resources/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection.fxml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/mvvmfx/src/test/resources/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection2.fxml b/mvvmfx/src/test/resources/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection2.fxml
new file mode 100644
index 000000000..a59bd22a2
--- /dev/null
+++ b/mvvmfx/src/test/resources/de/saxsys/mvvmfx/internal/viewloader/example/TestFxmlViewWithoutViewModelTypeButWithInjection2.fxml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 2d21f8a53..9c29b087a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
de.saxsys
mvvmfx-parent
pom
- 1.4.0
+ 1.4.1
mvvmFX parent
Application Framework for MVVM with JavaFX.
http://www.saxsys.de
diff --git a/travis_snapshot_release.sh b/travis_snapshot_release.sh
new file mode 100755
index 000000000..c55de2936
--- /dev/null
+++ b/travis_snapshot_release.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -ev
+
+BRANCH=${TRAVIS_BRANCH}
+
+if [ "$BRANCH" = "develop" ] || [ "$BRANCH" = "release" ]
+then
+ python addServer.py
+ mvn clean deploy -pl 'mvvmfx,mvvmfx-cdi,mvvmfx-guice,mvvmfx-archetype' -am -DskipTests=true --settings ~/.m2/mySettings.xml
+fi
\ No newline at end of file