JavaFX 2.2 WebView

I am using Javafx and FXML . I have created my form . in one of my pages I have a Tree in the left pane (Split Pane) , and the right pain is a Webview inside the right Anchor pane.

when I select a node on the tree (treeItem) the webview will change accordingly to the respective site that was selected in the tree view.

This works (like a charm)when I run it as an application.

HOWEVER , when viewing this in the browser (i.e. chrome , firefox and safari(mac)) i dont see the web view , it stays blank. i.e. the UI will load and the tree will be there , but the right jand pain never shows the embedded views.

When I run as a webstart I see the right views. The web pages that are embedded into the web views have a login, when i try login the web page flicker , like ther refresh and the login form is blanked, I have to enter the credential again.

not sure what is wrong or how to debug the browser / webstart side.

Answers


when viewing this in the browser (i.e. chrome , firefox and safari(mac)) i dont see the web view , it stays blank. i.e. the UI will load and the tree will be there , but the right jand pain never shows the embedded views.

If you not done so already, you will need to sign your application to allow it to run outside of the browser embedded Java application sandbox so that the webview's network layer has permission to access the external locations.

Also monitor the webview loadworker's exception property to see if an exception or FAILED state was encountered:

Worker worker = webview.getEngine().getLoadWorker();
worker.stateProperty().addListener(new ChangeListener<Worker.State>() {
  @Override public void changed(ObservableValue<? extends Worker.State> observableValue, Worker.State oldState, Worker.State newState) {
    System.out.println("Browser state change: " + newState);
  }
});
worker.exceptionProperty().addListener(new ChangeListener<Throwable>() {
  @Override public void changed(ObservableValue<? extends Throwable> observableValue, Throwable oldThrowable, Throwable newThrowable) {
    System.out.println("Browser encountered a load exception: " + newThrowable);
  }
});

not sure what is wrong or how to debug the browser / webstart side.

There is an excellent Oracle article on debugging steps for webstart / browser embedded applications. The article provides numerous pointers such as how to set debug and trace levels, etc.


Need Your Help

Is it likely that future releases of Chrome support contentWindow/contentDocument when iFrame loads a local html file from local html file?

html dom iframe dns local

When I make a local html load another local html file in a iFrame (frame.src=) in Chrome, I cannot access its document through contentWindow or contentDocument (even with the verification of

Compiling Allegro source code

c# visual-studio-2008 allegro

I am trying to build a C# project (downloaded code) in Visual Studio Express 2008. I get the error (my translation):

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.