Datafx Link 操作(不工作)
Datafx Link Action (Not working)
试图了解为什么我的 datafx 流程不起作用。我有 2 class WIPController.class(Master)
和 DeliverableEditFXMLController.class(Detail)
下面是我如何创建流程
StackPane pane = new StackPane();
DefaultFlowContainer flowContainer = new DefaultFlowContainer(pane);
Flow flow = new Flow(WIPController.class)
.withLink(WIPController.class, "bEditAction", DeliverableEditFXMLController.class)
.withLink(DeliverableEditFXMLController.class, "bSaveAction", WIPController.class)
;
flow.createHandler().start(flowContainer);
Scene scene = new Scene(pane);
Stage stage = new Stage();
stage.setScene(scene);
stage.show();
下面是空的WIPController.class
@FXMLController(value="fxml/WIP.fxml")
public class WIPController {
@FXMLViewFlowContext
private ViewFlowContext context;
@FXML
private TreeTableView<CaseDeliverable> ttblWIP;
@FXML
@LinkAction(DeliverableEditFXMLController.class)
private Button bTestAction;
@FXML
@ActionTrigger("bEditAction")
private Button bEdit; }
bEdit
按钮用于将您带到 (Details
) 控制器。查看显示,但我会点击按钮没有任何反应
我添加了 bTestAction
看看我是否可以通过 linkaction
注释让它发生但没有任何反应。
@FXMLController("fxml/DeliverableEditFXML.fxml")
public class DeliverableEditFXMLController {
@FXMLViewFlowContext
private ViewFlowContext context;
@FXML
@ActionTrigger("bSaveAction")
private Button bSave;
}
上面是详细信息控制器,您可以看到试图让 bSave
按钮返回主视图。
目前 bEdit
按钮不会将我带到 Detail
视图。如果有人能帮助我了解错误之处,将不胜感激。
代码没有问题,但似乎用于 datafx 的 jar 已损坏。
Download all jar for datafx from Mavern repository
试图了解为什么我的 datafx 流程不起作用。我有 2 class WIPController.class(Master)
和 DeliverableEditFXMLController.class(Detail)
下面是我如何创建流程
StackPane pane = new StackPane();
DefaultFlowContainer flowContainer = new DefaultFlowContainer(pane);
Flow flow = new Flow(WIPController.class)
.withLink(WIPController.class, "bEditAction", DeliverableEditFXMLController.class)
.withLink(DeliverableEditFXMLController.class, "bSaveAction", WIPController.class)
;
flow.createHandler().start(flowContainer);
Scene scene = new Scene(pane);
Stage stage = new Stage();
stage.setScene(scene);
stage.show();
下面是空的WIPController.class
@FXMLController(value="fxml/WIP.fxml")
public class WIPController {
@FXMLViewFlowContext
private ViewFlowContext context;
@FXML
private TreeTableView<CaseDeliverable> ttblWIP;
@FXML
@LinkAction(DeliverableEditFXMLController.class)
private Button bTestAction;
@FXML
@ActionTrigger("bEditAction")
private Button bEdit; }
bEdit
按钮用于将您带到 (Details
) 控制器。查看显示,但我会点击按钮没有任何反应
我添加了 bTestAction
看看我是否可以通过 linkaction
注释让它发生但没有任何反应。
@FXMLController("fxml/DeliverableEditFXML.fxml")
public class DeliverableEditFXMLController {
@FXMLViewFlowContext
private ViewFlowContext context;
@FXML
@ActionTrigger("bSaveAction")
private Button bSave;
}
上面是详细信息控制器,您可以看到试图让 bSave
按钮返回主视图。
目前 bEdit
按钮不会将我带到 Detail
视图。如果有人能帮助我了解错误之处,将不胜感激。
代码没有问题,但似乎用于 datafx 的 jar 已损坏。 Download all jar for datafx from Mavern repository