changeset 6541:eee373287ad8 8u20-b07

RT-36294 FXML binding on custom property in javafx8 not working, if that property created thrue constructor with no arguments
author Martin Sladecek <martin.sladecek@oracle.com>
date Mon, 24 Mar 2014 11:45:37 +0100
parents 12c8e820eb46
children 5c89a8fa0843 91fdf1709eae 20efa4fd3487
files modules/fxml/src/main/java/com/sun/javafx/fxml/expression/ExpressionValue.java modules/fxml/src/test/java/javafx/fxml/ExpressionBindingController.java modules/fxml/src/test/java/javafx/fxml/FXMLLoader_ExpressionTest.java modules/fxml/src/test/java/javafx/fxml/IncompletePropertyContainer.java modules/fxml/src/test/java/javafx/fxml/RT_14880Controller.java modules/fxml/src/test/java/javafx/fxml/RT_14880Test.java modules/fxml/src/test/java/javafx/fxml/RT_17646Controller.java modules/fxml/src/test/java/javafx/fxml/RT_17646Test.java modules/fxml/src/test/java/javafx/fxml/RT_18680Test.java modules/fxml/src/test/java/javafx/fxml/RT_24465.java modules/fxml/src/test/resources/javafx/fxml/expression_binding.fxml modules/fxml/src/test/resources/javafx/fxml/expression_escapechars.fxml modules/fxml/src/test/resources/javafx/fxml/expression_incomplete_property.fxml modules/fxml/src/test/resources/javafx/fxml/rt_14880.fxml modules/fxml/src/test/resources/javafx/fxml/rt_17646.fxml modules/fxml/src/test/resources/javafx/fxml/rt_18680.fxml
diffstat 16 files changed, 481 insertions(+), 623 deletions(-) [+]
line wrap: on
line diff
--- a/modules/fxml/src/main/java/com/sun/javafx/fxml/expression/ExpressionValue.java	Mon Mar 24 08:43:25 2014 +0100
+++ b/modules/fxml/src/main/java/com/sun/javafx/fxml/expression/ExpressionValue.java	Mon Mar 24 11:45:37 2014 +0100
@@ -79,12 +79,8 @@
         private ChangeListener<Object> propertyChangeListener = new ChangeListener<Object>() {
             @Override
             public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {
-                ReadOnlyProperty<?> property = (ReadOnlyProperty<?>)observable;
-
-                if (key.equals(property.getName())) {
-                    fireValueChangedEvent();
-                    remonitor();
-                }
+                fireValueChangedEvent();
+                remonitor();
             }
         };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/fxml/src/test/java/javafx/fxml/ExpressionBindingController.java	Mon Mar 24 11:45:37 2014 +0100
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javafx.fxml;
+
+import javafx.beans.property.DoubleProperty;
+import javafx.beans.property.SimpleDoubleProperty;
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+public class ExpressionBindingController {
+    private StringProperty nameProperty = new SimpleStringProperty(this, "name");
+    private DoubleProperty percentageProperty = new SimpleDoubleProperty(this, "percentage");
+
+    public ExpressionBindingController() {
+        setPercentage(0.5);
+    }
+
+    public String getName() {
+        return nameProperty.get();
+    }
+
+    public void setName(String value) {
+        nameProperty.set(value);
+    }
+
+    public StringProperty nameProperty() {
+        return nameProperty;
+    }
+
+    public Double getPercentage() {
+        return percentageProperty.get();
+    }
+
+    public void setPercentage(Double value) {
+        percentageProperty.set(value);
+    }
+
+    public DoubleProperty percentageProperty() {
+        return percentageProperty;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/fxml/src/test/java/javafx/fxml/FXMLLoader_ExpressionTest.java	Mon Mar 24 11:45:37 2014 +0100
@@ -0,0 +1,283 @@
+/*
+ * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package javafx.fxml;
+
+import com.sun.javafx.fxml.expression.Expression;
+import com.sun.javafx.fxml.expression.KeyPath;
+import javafx.collections.ObservableList;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+import static com.sun.javafx.fxml.expression.Expression.*;
+import static com.sun.javafx.fxml.expression.Expression.set;
+import static com.sun.javafx.fxml.expression.Expression.valueOf;
+import static org.junit.Assert.assertEquals;
+
+public class FXMLLoader_ExpressionTest {
+
+    @Test
+    public void testIncompletePropertyOnPath() throws IOException {
+        ObservableList<IncompletePropertyContainer> list = FXMLLoader.load(getClass().getResource("expression_incomplete_property.fxml"));
+        list.get(0).setProp("12345");
+        assertEquals("12345", list.get(1).getProp());
+    }
+
+    @Test
+    public void testExpression() {
+        Expression add = add(3, 4);
+        assertEquals(add.evaluate(null), 7);
+
+        Expression subtract = subtract(5, 2);
+        assertEquals(subtract.evaluate(null), 3);
+
+        Expression multiply = multiply(add, subtract);
+        assertEquals(multiply.evaluate(null), 21);
+
+        Expression divide = divide(multiply, 3);
+        assertEquals(divide.evaluate(null), 7);
+
+        Expression concatenate = add("abc", "def");
+        assertEquals(concatenate.evaluate(null), "abcdef");
+
+        assertEquals(greaterThan(divide, 3).evaluate(null), true);
+        assertEquals(greaterThan(divide, 7).evaluate(null), false);
+        assertEquals(greaterThanOrEqualTo(divide, 7).evaluate(null), true);
+
+        assertEquals(lessThan(divide, 9).evaluate(null), true);
+        assertEquals(lessThan(divide, 7).evaluate(null), false);
+        assertEquals(lessThanOrEqualTo(divide, 7).evaluate(null), true);
+
+        assertEquals(equalTo("abcd", "abcd").evaluate(null), true);
+    }
+
+    @Test
+    public void testParseExpression1() {
+        Expression expression = valueOf("1 + 2");
+        assertEquals(((Number)expression.evaluate(null)).intValue(), 3);
+    }
+
+    @Test
+    public void testParseExpression2a() {
+        Expression expression = valueOf("3 + 4 * 2");
+        assertEquals(((Number)expression.evaluate(null)).intValue(), 11);
+    }
+
+    @Test
+    public void testParseExpression2b() {
+        Expression expression = valueOf("3 + (4 * 2)");
+        assertEquals(((Number)expression.evaluate(null)).intValue(), 11);
+    }
+
+    @Test
+    public void testParseExpression2c() {
+        Expression expression = valueOf("(3 + 4) * 2");
+        assertEquals(((Number)expression.evaluate(null)).intValue(), 14);
+    }
+
+    @Test
+    public void testParseExpression3a() {
+        Expression expression = valueOf("'abc' == 'abc'");
+        assertEquals(expression.evaluate(null), true);
+    }
+
+    @Test
+    public void testParseExpression3b() {
+        Expression expression = valueOf("'abc' != 'abc'");
+        assertEquals(expression.evaluate(null), false);
+    }
+
+    @Test
+    public void testParseExpression3c() {
+        Expression expression = valueOf("'abc' == 'def'");
+        assertEquals(expression.evaluate(null), false);
+    }
+
+    @Test
+    public void testParseExpression3d() {
+        Expression expression = valueOf("'abc' != 'def'");
+        assertEquals(expression.evaluate(null), true);
+    }
+
+    @Test
+    public void testParseExpression3e() {
+        Expression expression = valueOf("3 > 2");
+        assertEquals(expression.evaluate(null), true);
+    }
+
+    @Test
+    public void testParseExpression3f() {
+        Expression expression = valueOf("3 < 2");
+        assertEquals(expression.evaluate(null), false);
+    }
+
+    @Test
+    public void testParseExpression4() {
+        assertEquals(valueOf("null").evaluate(null), null);
+        assertEquals(valueOf("true").evaluate(null), true);
+        assertEquals(valueOf("false").evaluate(null), false);
+    }
+
+    @Test
+    public void testParseExpression5() {
+        HashMap<String, Object> namespace = new HashMap<String, Object>();
+
+        HashMap<String, Object> a = new HashMap<String, Object>();
+        namespace.put("a", a);
+
+        HashMap<String, Object> b = new HashMap<String, Object>();
+        a.put("b", b);
+
+        b.put("c", 5);
+
+        String path = "a['b'].c";
+
+        Expression expression = valueOf(path);
+
+        System.out.println(expression + " = " + expression.evaluate(namespace));
+        assertEquals(((Number)expression.evaluate(namespace)).intValue(), 5);
+
+        expression = valueOf("3 * " + path + " + 2");
+        System.out.println(expression + " = " + expression.evaluate(namespace));
+        assertEquals(((Number)expression.evaluate(namespace)).intValue(), 17);
+
+        set(namespace, KeyPath.parse(path), 10);
+        assertEquals(((Number)expression.evaluate(namespace)).intValue(), 32);
+
+        expression = valueOf("nu['b'].c");
+        System.out.println(expression + " = " + expression.evaluate(namespace));
+        assertEquals(expression.evaluate(namespace), null);
+    }
+
+    @Test
+    public void testParseExpression6() {
+        Expression expression = valueOf("-2");
+        assertEquals(((Number)expression.evaluate(null)).intValue(), -2);
+
+        expression = valueOf("3 + -2");
+        assertEquals(((Number)expression.evaluate(null)).intValue(), 1);
+        System.out.println(expression + " = " + expression.evaluate(null));
+    }
+
+    @Test
+    public void testParseExpression6a() {
+        Expression expression = valueOf("--2");
+        assertEquals(((Number)expression.evaluate(null)).intValue(), 2);
+    }
+
+    @Test
+    public void testParseExpression7() {
+        Expression expression = valueOf("!false");
+        assertEquals(expression.evaluate(null), true);
+
+        expression = valueOf("true && !false");
+        System.out.println(expression + " = " + expression.evaluate(null));
+        assertEquals(expression.evaluate(null), true);
+    }
+
+    @Test
+    public void testParseExpression7a() {
+        Expression expression = valueOf("!!false");
+        assertEquals(expression.evaluate(null), false);
+    }
+
+    @Test
+    public void testParseExpression8a() {
+        Expression expression = valueOf("\"a\" + \"b\"");
+        assertEquals(expression.evaluate(null), "ab");
+    }
+
+    @Test
+    public void testParseExpression8b() {
+        Expression expression = valueOf("'a' + 'b'");
+        assertEquals(expression.evaluate(null), "ab");
+    }
+
+    @Test
+    public void testParseExpression8c() {
+        Expression expression = valueOf("'1' + 2");
+        assertEquals(expression.evaluate(null), "12");
+    }
+
+    @Test
+    public void testParseExpression8d() {
+        Expression expression = valueOf("1 + '2'");
+        assertEquals(expression.evaluate(null), "12");
+    }
+
+    @Test
+    public void testParseExpression8e() {
+        Expression expression = valueOf("1 + '2' == '12'");
+        assertEquals(expression.evaluate(null), true);
+    }
+
+    @Test
+    public void testParseExpression8f() {
+        Expression expression = valueOf("1 + 2 + ' fiddlers'");
+        assertEquals(expression.evaluate(null), "3 fiddlers");
+    }
+
+    @Test
+    public void testParseExpression8g() {
+        Expression expression = valueOf("'fiddlers ' + 1 + 2");
+        assertEquals(expression.evaluate(null), "fiddlers 12");
+    }
+
+    @Test
+    public void testMarkup() throws IOException {
+        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("expression_binding.fxml"));
+        fxmlLoader.load();
+
+        ExpressionBindingController controller = (ExpressionBindingController)fxmlLoader.getController();
+
+        Widget childWidget1 = (Widget)fxmlLoader.getNamespace().get("childWidget1");
+        assertEquals(childWidget1.isEnabled(), false);
+
+        controller.setPercentage(0.85);
+        assertEquals(childWidget1.isEnabled(), true);
+    }
+
+    @Test
+    public void testEscapeSequences() throws IOException {
+        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("expression_escapechars.fxml"));
+        fxmlLoader.load();
+
+        Widget widget1 = (Widget)fxmlLoader.getNamespace().get("widget1");
+        assertEquals(widget1.getName(), fxmlLoader.getNamespace().get("abc"));
+
+        Widget widget2 = (Widget)fxmlLoader.getNamespace().get("widget2");
+        assertEquals(widget2.getName(), "$abc");
+
+        Widget widget3 = (Widget)fxmlLoader.getNamespace().get("widget3");
+        assertEquals(widget3.getName(), "$abc");
+
+        Widget widget4 = (Widget)fxmlLoader.getNamespace().get("widget4");
+        assertEquals(widget4.getName(), "\\abc");
+    }
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/fxml/src/test/java/javafx/fxml/IncompletePropertyContainer.java	Mon Mar 24 11:45:37 2014 +0100
@@ -0,0 +1,24 @@
+package javafx.fxml;
+
+import javafx.beans.property.SimpleStringProperty;
+import javafx.beans.property.StringProperty;
+
+/**
+* Created by msladecek on 3/24/14.
+*/
+public class IncompletePropertyContainer {
+
+    private StringProperty prop = new SimpleStringProperty("");
+
+    public String getProp() {
+        return prop.get();
+    }
+
+    public void setProp(String s) {
+        prop.set(s);
+    }
+
+    public StringProperty propProperty() {
+        return prop;
+    }
+}
--- a/modules/fxml/src/test/java/javafx/fxml/RT_14880Controller.java	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javafx.fxml;
-
-import javafx.beans.property.DoubleProperty;
-import javafx.beans.property.SimpleDoubleProperty;
-import javafx.beans.property.SimpleStringProperty;
-import javafx.beans.property.StringProperty;
-
-public class RT_14880Controller {
-    private StringProperty nameProperty = new SimpleStringProperty(this, "name");
-    private DoubleProperty percentageProperty = new SimpleDoubleProperty(this, "percentage");
-
-    public RT_14880Controller() {
-        setPercentage(0.5);
-    }
-
-    public String getName() {
-        return nameProperty.get();
-    }
-
-    public void setName(String value) {
-        nameProperty.set(value);
-    }
-
-    public StringProperty nameProperty() {
-        return nameProperty;
-    }
-
-    public Double getPercentage() {
-        return percentageProperty.get();
-    }
-
-    public void setPercentage(Double value) {
-        percentageProperty.set(value);
-    }
-
-    public DoubleProperty percentageProperty() {
-        return percentageProperty;
-    }
-}
--- a/modules/fxml/src/test/java/javafx/fxml/RT_14880Test.java	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javafx.fxml;
-
-import java.io.IOException;
-import java.util.HashMap;
-
-import org.junit.Test;
-
-import com.sun.javafx.fxml.expression.Expression;
-import com.sun.javafx.fxml.expression.KeyPath;
-
-import static com.sun.javafx.fxml.expression.Expression.*;
-import static org.junit.Assert.*;
-
-public class RT_14880Test {
-    @Test
-    public void testExpression() {
-        Expression add = add(3, 4);
-        assertEquals(add.evaluate(null), 7);
-
-        Expression subtract = subtract(5, 2);
-        assertEquals(subtract.evaluate(null), 3);
-
-        Expression multiply = multiply(add, subtract);
-        assertEquals(multiply.evaluate(null), 21);
-
-        Expression divide = divide(multiply, 3);
-        assertEquals(divide.evaluate(null), 7);
-
-        Expression concatenate = add("abc", "def");
-        assertEquals(concatenate.evaluate(null), "abcdef");
-
-        assertEquals(greaterThan(divide, 3).evaluate(null), true);
-        assertEquals(greaterThan(divide, 7).evaluate(null), false);
-        assertEquals(greaterThanOrEqualTo(divide, 7).evaluate(null), true);
-
-        assertEquals(lessThan(divide, 9).evaluate(null), true);
-        assertEquals(lessThan(divide, 7).evaluate(null), false);
-        assertEquals(lessThanOrEqualTo(divide, 7).evaluate(null), true);
-
-        assertEquals(equalTo("abcd", "abcd").evaluate(null), true);
-    }
-
-    @Test
-    public void testParseExpression1() {
-        Expression expression = valueOf("1 + 2");
-        assertEquals(((Number)expression.evaluate(null)).intValue(), 3);
-    }
-
-    @Test
-    public void testParseExpression2a() {
-        Expression expression = valueOf("3 + 4 * 2");
-        assertEquals(((Number)expression.evaluate(null)).intValue(), 11);
-    }
-
-    @Test
-    public void testParseExpression2b() {
-        Expression expression = valueOf("3 + (4 * 2)");
-        assertEquals(((Number)expression.evaluate(null)).intValue(), 11);
-    }
-
-    @Test
-    public void testParseExpression2c() {
-        Expression expression = valueOf("(3 + 4) * 2");
-        assertEquals(((Number)expression.evaluate(null)).intValue(), 14);
-    }
-
-    @Test
-    public void testParseExpression3a() {
-        Expression expression = valueOf("'abc' == 'abc'");
-        assertEquals(expression.evaluate(null), true);
-    }
-
-    @Test
-    public void testParseExpression3b() {
-        Expression expression = valueOf("'abc' != 'abc'");
-        assertEquals(expression.evaluate(null), false);
-    }
-
-    @Test
-    public void testParseExpression3c() {
-        Expression expression = valueOf("'abc' == 'def'");
-        assertEquals(expression.evaluate(null), false);
-    }
-
-    @Test
-    public void testParseExpression3d() {
-        Expression expression = valueOf("'abc' != 'def'");
-        assertEquals(expression.evaluate(null), true);
-    }
-
-    @Test
-    public void testParseExpression3e() {
-        Expression expression = valueOf("3 > 2");
-        assertEquals(expression.evaluate(null), true);
-    }
-
-    @Test
-    public void testParseExpression3f() {
-        Expression expression = valueOf("3 < 2");
-        assertEquals(expression.evaluate(null), false);
-    }
-
-    @Test
-    public void testParseExpression4() {
-        assertEquals(valueOf("null").evaluate(null), null);
-        assertEquals(valueOf("true").evaluate(null), true);
-        assertEquals(valueOf("false").evaluate(null), false);
-    }
-
-    @Test
-    public void testParseExpression5() {
-        HashMap<String, Object> namespace = new HashMap<String, Object>();
-
-        HashMap<String, Object> a = new HashMap<String, Object>();
-        namespace.put("a", a);
-
-        HashMap<String, Object> b = new HashMap<String, Object>();
-        a.put("b", b);
-
-        b.put("c", 5);
-
-        String path = "a['b'].c";
-
-        Expression expression = valueOf(path);
-
-        System.out.println(expression + " = " + expression.evaluate(namespace));
-        assertEquals(((Number)expression.evaluate(namespace)).intValue(), 5);
-
-        expression = valueOf("3 * " + path + " + 2");
-        System.out.println(expression + " = " + expression.evaluate(namespace));
-        assertEquals(((Number)expression.evaluate(namespace)).intValue(), 17);
-
-        set(namespace, KeyPath.parse(path), 10);
-        assertEquals(((Number)expression.evaluate(namespace)).intValue(), 32);
-
-        expression = valueOf("nu['b'].c");
-        System.out.println(expression + " = " + expression.evaluate(namespace));
-        assertEquals(expression.evaluate(namespace), null);
-    }
-
-    @Test
-    public void testParseExpression6() {
-        Expression expression = valueOf("-2");
-        assertEquals(((Number)expression.evaluate(null)).intValue(), -2);
-
-        expression = valueOf("3 + -2");
-        assertEquals(((Number)expression.evaluate(null)).intValue(), 1);
-        System.out.println(expression + " = " + expression.evaluate(null));
-    }
-
-    @Test
-    public void testParseExpression6a() {
-        Expression expression = valueOf("--2");
-        assertEquals(((Number)expression.evaluate(null)).intValue(), 2);
-    }
-
-    @Test
-    public void testParseExpression7() {
-        Expression expression = valueOf("!false");
-        assertEquals(expression.evaluate(null), true);
-
-        expression = valueOf("true && !false");
-        System.out.println(expression + " = " + expression.evaluate(null));
-        assertEquals(expression.evaluate(null), true);
-    }
-
-    @Test
-    public void testParseExpression7a() {
-        Expression expression = valueOf("!!false");
-        assertEquals(expression.evaluate(null), false);
-    }
-
-    @Test
-    public void testParseExpression8a() {
-        Expression expression = valueOf("\"a\" + \"b\"");
-        assertEquals(expression.evaluate(null), "ab");
-    }
-
-    @Test
-    public void testParseExpression8b() {
-        Expression expression = valueOf("'a' + 'b'");
-        assertEquals(expression.evaluate(null), "ab");
-    }
-
-    @Test
-    public void testParseExpression8c() {
-        Expression expression = valueOf("'1' + 2");
-        assertEquals(expression.evaluate(null), "12");
-    }
-
-    @Test
-    public void testParseExpression8d() {
-        Expression expression = valueOf("1 + '2'");
-        assertEquals(expression.evaluate(null), "12");
-    }
-
-    @Test
-    public void testParseExpression8e() {
-        Expression expression = valueOf("1 + '2' == '12'");
-        assertEquals(expression.evaluate(null), true);
-    }
-
-    @Test
-    public void testParseExpression8f() {
-        Expression expression = valueOf("1 + 2 + ' fiddlers'");
-        assertEquals(expression.evaluate(null), "3 fiddlers");
-    }
-
-    @Test
-    public void testParseExpression8g() {
-        Expression expression = valueOf("'fiddlers ' + 1 + 2");
-        assertEquals(expression.evaluate(null), "fiddlers 12");
-    }
-
-    @Test
-    public void testMarkup() throws IOException {
-        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_14880.fxml"));
-        fxmlLoader.load();
-
-        RT_14880Controller controller = (RT_14880Controller)fxmlLoader.getController();
-
-        Widget childWidget1 = (Widget)fxmlLoader.getNamespace().get("childWidget1");
-        assertEquals(childWidget1.isEnabled(), false);
-
-        controller.setPercentage(0.85);
-        assertEquals(childWidget1.isEnabled(), true);
-    }
-}
--- a/modules/fxml/src/test/java/javafx/fxml/RT_17646Controller.java	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javafx.fxml;
-
-import javafx.beans.property.SimpleStringProperty;
-import javafx.beans.property.StringProperty;
-
-public class RT_17646Controller {
-    private StringProperty name = new SimpleStringProperty();
-
-    public static final String DEFAULT_NAME = "abcd";
-
-    public RT_17646Controller() {
-        setName(DEFAULT_NAME);
-    }
-
-    public String getName() {
-        return name.get();
-    }
-
-    public void setName(String value) {
-        name.set(value);
-    }
-
-    public StringProperty nameProperty() {
-        return name;
-    }
-}
--- a/modules/fxml/src/test/java/javafx/fxml/RT_17646Test.java	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javafx.fxml;
-
-import java.io.IOException;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class RT_17646Test {
-    @Test(expected=LoadException.class)
-    public void testBidirectionalBinding() throws IOException {
-        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_17646.fxml"));
-
-        Widget widget = (Widget)fxmlLoader.load();
-        RT_17646Controller controller = (RT_17646Controller)fxmlLoader.getController();
-        assertEquals(widget.getName(), controller.getName());
-
-        String name1 = "efgh";
-        controller.setName(name1);
-        assertEquals(widget.getName(), name1);
-
-        String name2 = "ijkl";
-        widget.setName(name2);
-        assertEquals(controller.getName(), name2);
-    }
-}
--- a/modules/fxml/src/test/java/javafx/fxml/RT_18680Test.java	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javafx.fxml;
-
-import java.io.IOException;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class RT_18680Test {
-    @Test
-    public void testEscapeSequences() throws IOException {
-        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_18680.fxml"));
-        fxmlLoader.load();
-
-        Widget widget1 = (Widget)fxmlLoader.getNamespace().get("widget1");
-        assertEquals(widget1.getName(), fxmlLoader.getNamespace().get("abc"));
-
-        Widget widget2 = (Widget)fxmlLoader.getNamespace().get("widget2");
-        assertEquals(widget2.getName(), "$abc");
-
-        Widget widget3 = (Widget)fxmlLoader.getNamespace().get("widget3");
-        assertEquals(widget3.getName(), "$abc");
-
-        Widget widget4 = (Widget)fxmlLoader.getNamespace().get("widget4");
-        assertEquals(widget4.getName(), "\\abc");
-    }
-}
--- a/modules/fxml/src/test/java/javafx/fxml/RT_24465.java	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package javafx.fxml;
-
-import javafx.application.Application;
-import javafx.scene.Scene;
-import javafx.stage.Stage;
-
-public class RT_24465 extends Application {
-    @Override
-    public void start(Stage primaryStage) throws Exception {
-        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("rt_24465.fxml"));
-        primaryStage.setScene((Scene)fxmlLoader.load());
-        primaryStage.show();
-    }
-
-    public static void main(String[] args) {
-        launch(args);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/fxml/src/test/resources/javafx/fxml/expression_binding.fxml	Mon Mar 24 11:45:37 2014 +0100
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the LICENSE file that accompanied this code.
+
+This code is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+version 2 for more details (a copy is included in the LICENSE file that
+accompanied this code).
+
+You should have received a copy of the GNU General Public License version
+2 along with this work; if not, write to the Free Software Foundation,
+Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+or visit www.oracle.com if you need additional information or have any
+questions.
+-->
+
+<?import javafx.fxml.Widget?>
+
+<Widget fx:controller="javafx.fxml.ExpressionBindingController"
+    xmlns:fx="http://javafx.com/fxml">
+    <Widget fx:id="childWidget1" name="Child Widget 1" enabled="${controller.percentage > 0.75}"/>
+</Widget>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/fxml/src/test/resources/javafx/fxml/expression_escapechars.fxml	Mon Mar 24 11:45:37 2014 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the LICENSE file that accompanied this code.
+
+This code is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+version 2 for more details (a copy is included in the LICENSE file that
+accompanied this code).
+
+You should have received a copy of the GNU General Public License version
+2 along with this work; if not, write to the Free Software Foundation,
+Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+or visit www.oracle.com if you need additional information or have any
+questions.
+-->
+
+<?import java.lang.String?>
+<?import javafx.fxml.Widget?>
+
+<Widget xmlns:fx="http://javafx.com/fxml">
+    <fx:define>
+        <String fx:id="abc" fx:value="ABC"/>
+    </fx:define>
+    
+    <Widget fx:id="widget1" name="$abc"/>
+    <Widget fx:id="widget2" name="\$abc"/>
+    <Widget fx:id="widget3" name="$$abc"/>
+    <Widget fx:id="widget4" name="\\abc"/>
+</Widget>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/fxml/src/test/resources/javafx/fxml/expression_incomplete_property.fxml	Mon Mar 24 11:45:37 2014 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 2 only, as
+published by the Free Software Foundation.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the LICENSE file that accompanied this code.
+
+This code is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+version 2 for more details (a copy is included in the LICENSE file that
+accompanied this code).
+
+You should have received a copy of the GNU General Public License version
+2 along with this work; if not, write to the Free Software Foundation,
+Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+or visit www.oracle.com if you need additional information or have any
+questions.
+-->
+<?import javafx.fxml.IncompletePropertyContainer?>
+<?import javafx.collections.FXCollections?>
+
+<?import javafx.fxml.IncompletePropertyContainer?>
+<FXCollections fx:factory="observableArrayList" xmlns:fx="http://javafx.com/fxml">
+    <IncompletePropertyContainer fx:id="first" prop="ABC"/>
+    <IncompletePropertyContainer prop="${first.prop}"/>
+</FXCollections>
\ No newline at end of file
--- a/modules/fxml/src/test/resources/javafx/fxml/rt_14880.fxml	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-
-<?import javafx.fxml.Widget?>
-
-<Widget fx:controller="javafx.fxml.RT_14880Controller"
-    xmlns:fx="http://javafx.com/fxml">
-    <Widget fx:id="childWidget1" name="Child Widget 1" enabled="${controller.percentage > 0.75}"/>
-</Widget>
-
-
--- a/modules/fxml/src/test/resources/javafx/fxml/rt_17646.fxml	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-
-<?import javafx.fxml.*?>
-
-<Widget fx:controller="javafx.fxml.RT_17646Controller" name="#{controller.name}"
-    xmlns:fx="http://javafx.com/fxml"/>
--- a/modules/fxml/src/test/resources/javafx/fxml/rt_18680.fxml	Mon Mar 24 08:43:25 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-
-This code is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation.  Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
-
-This code is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-version 2 for more details (a copy is included in the LICENSE file that
-accompanied this code).
-
-You should have received a copy of the GNU General Public License version
-2 along with this work; if not, write to the Free Software Foundation,
-Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-or visit www.oracle.com if you need additional information or have any
-questions.
--->
-
-<?import java.lang.String?>
-<?import javafx.fxml.Widget?>
-
-<Widget xmlns:fx="http://javafx.com/fxml">
-    <fx:define>
-        <String fx:id="abc" fx:value="ABC"/>
-    </fx:define>
-    
-    <Widget fx:id="widget1" name="$abc"/>
-    <Widget fx:id="widget2" name="\$abc"/>
-    <Widget fx:id="widget3" name="$$abc"/>
-    <Widget fx:id="widget4" name="\\abc"/>
-</Widget>
-
-