修改README
This commit is contained in:
@@ -205,18 +205,16 @@ public class MainController extends FXBaseController{
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
Label label;
|
Label label;
|
||||||
|
|
||||||
Student student;
|
Student student;
|
||||||
|
|
||||||
int count = 1;
|
int count = 1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
student = (Student) FXEntityFactory.getInstance().createJavaBeanProxy(Student.class); //工厂产生一个学生
|
student = (Student) FXEntityFactory.wrapFxBean(Student.class); //工厂产生一个学生
|
||||||
student.setName("Jack"); //设置学生姓名
|
student.setName("Jack"); //设置学生姓名
|
||||||
FXEntityProxy fxEntityProxy = FXPlusContext.getProryByBeanObject(student); //获取学生代理
|
Property nameProperty = FXPlusContext.getEntityPropertyByName(student, "name");
|
||||||
Property nameProperty = fxEntityProxy.getPropertyByFieldName("name"); //获取Bean对应的Property
|
|
||||||
//可以通过fxEntityProxy.getPropertyByFieldName("list"); 获得List的Property
|
|
||||||
label.textProperty().bind(nameProperty); //属性绑定
|
label.textProperty().bind(nameProperty); //属性绑定
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user