-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
1、
JavaFXApplication.showView(TagInfoDialog.class, Modality.APPLICATION_MODAL);
2、
@FXMLController
public class TagInfoController implements Initializable {
public void initialize(URL location, ResourceBundle resources) {
Platform.runLater(() -> {
String protocol = CommonSession.Session_Protocol;
switch (protocol) {
case "DL/T 645":
Label lblParam1_dlt645 = new Label("数据项名称:");
this.hbxRow2.getChildren().add(lblParam1_dlt645);
break;
case "CJ/T 188":
Label lblParam1_cjt188 = new Label("厂商代码:");
this.hbxRow2.getChildren().add(lblParam1_cjt188);
TextField txtParam1_cjt188 = new TextField();
this.hbxRow2.getChildren().add(txtParam1_cjt188);
break;
}
});
}
}
Like the code above, I need to change the display of the page when protocol is a different value. But the initialize method of the above code is only executed once (because it is hidden when the page is closed), and it is not executed again when the protocol value changes. How to change the display of the page
Metadata
Metadata
Assignees
Labels
No labels