Questions tagged [javafx-webengine]

WebEngine is a non-visual object capable of managing one Web page at a time. It loads Web pages, creates their document models, applies styles as necessary, and runs JavaScript on pages. It provides access to the document model of the current page, and enables two-way communication between a Java application and JavaScript code of the page.

264 questions
4
votes
0 answers

JavaFX WebEngine How To Keep Form Values

I am using JavaFX's WebEngine to implement OAuth for login to a website. Everything about the login process works fine, however I have noticed that the username and password is not remembered the next time I attempt to login (like other web…
user3461443
  • 221
  • 1
  • 3
  • 6
4
votes
2 answers

How to stop WebEngine after closing stage JavaFX?

When i create new stage with WebEngine that playing video from YouTube, after i close it - Youtube keeps playing on backgroung. If i use "Platform.exit" - its close all my JavaFX App, but i want to close only stage that been created for…
user3425552
  • 43
  • 1
  • 3
3
votes
2 answers

On which thread JavaFX change listeners are executed ?

Is the code added in following document change listener will always get executed in JavaFX application thread ? webEngineObject.documentProperty().addListener(new ChangeListener(){ @Override …
3
votes
0 answers

WebEngine done loading - Javafx

I am trying to login to a website and then load a url. This is what I have so far package application; import javafx.application.Application; import javafx.beans.property.*; import javafx.beans.value.*; import javafx.event.*; import…
Mus Akhi
  • 31
  • 1
3
votes
0 answers

Javafx WebEngine calling Javascript window.location.hash doesn't work

I tried different solution to make my webview point to a specific anchor in the document but failed. my target name is 'occ' I used window.location.hash = 'occ' and window.location.href ='#occ'but didn't work here my code …
3
votes
1 answer

Is it possible to retrieve HTML element in web engine without using Javascript?

Is there a way to identify the type of the clicked element in webView (like Textbox/Radio/Button etc) using the webEngine.getDocument()? Suppose I click on a textfield, I can get the x,y coordinates of the clicked position. Is it possible to…
NaveenBharadwaj
  • 1,212
  • 5
  • 19
  • 42
3
votes
1 answer

JavaFX WebView recreate window on reload

I'm creating a page that will be opened either in the WebView from Java, or manually in external browser. If page is loaded from Java - I need it to perform specific callbacks, cuz Java is used as kind of a backend, but if page is loaded manually it…
3
votes
1 answer

JavaFX WebView URL.createObjectURL undefined

I'm using JavaFX 8 embedded WebView. I want to build Blob URL from an Blob image. But, URL.createObjectURL gives me undefined. Is there any way (shim or eg.) to create Blob URL from Blob object in JavaFX 8 WebView environment??
Rahman Usta
  • 716
  • 3
  • 14
  • 28
3
votes
2 answers

JavaFX disable highlight and copy mode in WebEngine

I'm switching from JEditorPane to WebEngine(JavaFX). I used to lock the text highlighting(selecting) in JEditorPane as following. my_editor.setEditable(false); my_editor.getInputMap().put(KeyStroke.getKeyStroke("control C"), "none"); Now I like to…
user2889419
3
votes
3 answers

Getting JavaFX WebEngine Interpreted Document

Calling the getDocument() method on the WebEngine object for me only returns the source retrieved from the server, without the JavaScript being executed (there are still elements). This is the kind of source you would see if you used "View Source"…
user1246808
3
votes
3 answers

JavaFX: in WebView img tag is not loading local images

Following is my code. Everything is fine. I can load a remote page. I can put HTML content but my img tag shows a X sign meaning that it is not able to load the images. Note: My images are located in the same package along with the class JavaFX in a…
Muhammad
  • 6,725
  • 5
  • 47
  • 54
3
votes
0 answers

JavaFX webengine.executeScript as first line of code, runs at the end of the code

I need to take a snapshot of a very long page. I want to take multiple screenshots and put them together luggage. to move the view I am using a javascript to do scrolling. these functions: private ArrayList takeSnapshots (int…
3
votes
1 answer

Disabling loading of images in JavaFX WebEngine

I've searched everywhere but found no way to disable loading of images by Java WebEngine. Research done: I found some ideas, such as using URL.setURLStreamHandlerFactory() to use my own URLStreamHandler, and having that analyze the URL to only…
ttilt
  • 31
  • 2
3
votes
2 answers

Passing Java Array into JavaScript (via JSNI) and back out to Java results in null value

Scenario: I have a GWT web application running within a JavaFX WebView/WebEngine. I am able to pass Strings from GWT to JavaScript to JavaFX without any issues. Problem: When passing an array of custom objects like Data[] in the same fashion, the…
Splaktar
  • 5,506
  • 5
  • 43
  • 74
2
votes
1 answer

JavaFX access internal webkit document

I am trying to access javafx.web/com.sun.webkit.dom from my unnamed module javafx project. For this, I have created a class com.sun.webkit.dom.DomMapper. I do not see any error in the IDE, but when I run it using mvn clean javafx:run it complains…
1 2
3
17 18