DataFX TaskAction NOT UPDATE Field VALUE

31 views
Skip to first unread message

Ugo Di Capua

unread,
Aug 7, 2015, 1:12:28 PM8/7/15
to DataFX
I have another problem with data refresh

This is my flow
Flow flow = new Flow(MasterViewController.class)
.withTaskAction(MasterViewController.class, "load",LoadAction.class);

This is LoadAction
public class LoadAction implements Runnable {

@Inject
private DataModel model;

@Override
public void run() {
model.setMyProperty("New Property Value");

}

@ViewController("SimpleView.fxml")
public class MasterViewController {



@FXML
@ActionTrigger("load")
private Button loadButton;

@FXML
@ActionTrigger("showDetails")
private Button showDetailsButton;

@FXML
@ActionTrigger("changeView")
private Button changeButton;

@FXML
private TextField myvalue;

@ActionHandler
private FlowActionHandler actionHandler;

@Inject
@FXMLApplicationContext
private DataModel model;

@PostConstruct
public void init() {
myvalue.textProperty().bindBidirectional(model.getMyProperty());
}
public class DataModel {

private StringProperty myProperty;

public DataModel() {
myProperty= new SimpleStringProperty("First Value");
}


public StringProperty getMyProperty() {
return myProperty ;
}

public void setMyProperty(String xx) {
this.myProperty =  new SimpleStringProperty(xx);
}

After that loadButton call action the filed value into the view not change
Reply all
Reply to author
Forward
0 new messages