I have a pretty simple application that lists rows from a database in a tableview. When the user clicks on a row in that list, the application grabs the XML column from that row, and is supposed to display it in a WebView in the same window. Everything other than actually displaying the XML works fine. I've been beating my head on this for a while, but I'm not getting anywhere. Here's the code that the listener calls:
@FXML
private void showXML(QueryRow row) {
String msg = "";
try {
msg = mainApp.getMsg(row.getID().get());
} catch (SQLException e) {
e.printStackTrace();
}
final String fm = msg;
System.out.println(msg);
//tb.setText(msg);
webEngine = webView.getEngine();
// webEngine.getLoadWorker().stateProperty().addListener(new ChangeListener<State>() {
//
// public void changed(ObservableValue ov, State oldState, State newState) {
//
// if (newState == Worker.State.SUCCEEDED) {
// System.out.println("inside");
// webEngine.load(fm);
// //stage.setTitle(webEngine.getLocation());
// }
//
// }
// });
System.out.println("Go baby go!");
webEngine.load(fm);
}
What am I missing?