Issue #30 resolved

Injection does not works with abstract classes

Nicolas-Xavier Vanderlinden
created an issue
@FXMLController("tableview.fxml")
public class MasterController extends ViewController {

    @FXML
    private TableView<DeliveryPoint> tableView;

    @PostConstruct
    public void init() {
        tableView.setOnMouseClicked(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent event) {
               if(event.getClickCount() >= 2) {
                       actionHandler.handle("showDetails");
               }
            }
        });

}

public abstract class ViewController {

    @FXMLViewFlowContext
    protected ViewFlowContext context;

    @ActionHandler
    protected FlowActionHandler actionHandler;
}

actionHandler is never injected. I have to move @ActionHandler from abstract class to MainController.java

Comments (4)

  1. Hendrik Ebbers

    Will try to fix this for 8-b3. 8-b2 will be released the next day. In this version actions will be executed by default with a double click on a table. So you don't need the event handler any more.

  2. Log in to comment