FAQ Database Discussion Community

JavaFx Webview goes to mobile site -(using jdk 7)

I am trying to create a JavaFX desktop application which consists of an embedded browser. webEngine.load("http://sampleurl"); This statment loads the mobile website for some sites and for some others it loads the desktop site. Is this because of JavaFX or the implementation of the respective websites? Morever the view is...

maxlength property not working with javafx webview

I'm developing an application using Struts2. It works fine in Chrome/IE etc. On JavaFX webview the maxlength property doesn't restrict the user input to the specified amount. Sample code: <s:textfield name = "user_cno" label = "Contact No" id = "idContactNo" class = "inputField" maxlength = "10" /> I've tried changing...

JavaFX 8 WebEngine: How to get console.log() from javascript to System.out in java?

I'm using both JavaFX and the javascript engine inside JavaFX WebEngine to develop an application. I'd like to get feedback from javascript for debugging purposes. What happens to the console output inside the WebEngine? Is there any way I can access it, or redirect to System.out in java?

Changing JavaFX label using Javascript callback method

This question might be considered as a simple extension to this qeustionI have a simple application with a label and a WebView. The WebView contains a small rectangle whose onclick should invoke a method in JavaFX and change the text of a label. Following is my FXML file <?xml version="1.0"...

How to reload a page in DukeScript

DukeScript is quite clever in the way it handle changes to the Model so that code is hot-swapped at runtime, see for example here. One thing it doesn't seem to handle at Runtime though is changes to the HTML layout. Given it runs in a WebView, a kind of a...

How to catch return value from javascript in javafx?

I am executing a javascript code in my webview of JavaFX application. I need to make it execute repeatedly whenever there is a mouse click and get the element details into a java variable. I'm using the below code and using Firebug Lite. In Firebug console, required items are printing....

Can''t get JavaScript to work in WebView

I have a fairly simple JavaFX application. It has one window, split in two. On the left is a tableview that lists rows from a database. When you select one of the rows, it displays the XML (also from the database) in a webview on the right. So far so...

JavaFX WebView can't load certain sites

I'm trying to use JavaFX's WebView to load this site, but all I get is a blank screen. The WebView is working perfectly fine on other sites; it gets 100/100 on ACID3 and loads other HTTPS sites without any problems whatsoever. I can't find anything particularly wrong with the site...