Adam Bien's Weblog
Java FX 2 Data Binding Explained …With A JUnit Test
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;
public class StringDataBindingTest {
@Test
public void bindUnidirectionally(){
String expected = "DukeFX";
StringProperty from = new SimpleStringProperty();
StringProperty to = new SimpleStringProperty();
to.bind(from);
from.set(expected);
String actual = to.get();
assertThat(actual,is(expected));
}
}
Any questions? :-)
Posted at 09:16AM Dec 23, 2011 by Adam Bien in Real World Java EE Patterns - Rethinking Best Practices | Comments[3] | Views/Hits: 5579
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich
A book about rethinking Java EE Patterns
Tweet Follow @AdamBien

Ah, now i've got it :)
Posted by Mike on December 23, 2011 at 09:41 AM CET #
I hit a roadblock trying to change the Dynamic Web Module version to 2.5. Eclipse reports “cannot change version of project facet dynamic web module to 2.5″, nothing more.How do I change the facet to 2.5?
Posted by net grid on July 21, 2012 at 03:39 PM CEST #
An useful and an important one information to enable displaying data in data grid’s cells.its also an important one.
Posted by Annie on July 23, 2012 at 11:43 AM CEST #