java - javafx webview not supporting Ajax web features -


i trying open webpage in webview using javafx . opening web page not supporting ajax based web features partial refreshing , new window popup handling using following code

  final group group= new group();   scene scene= new scene(group);   fxpanel.setscene(scene);       webview  webview = new webview ();   group.getchildren().add(webview);    eng= webview.getengine();   eng.setjavascriptenabled(true);         try{              string url="http://www.abc.com";             eng.load(url);             eng.setcreatepopuphandler(             new callback<popupfeatures, webengine>() {             @override             public webengine call(popupfeatures config) {             smallview = new webview();             smallview.setfontscale(0.8);              chatpopup frm = new chatpopup(smallview);             frm.setbounds(0,0,400,250);             frm.setvisible(true);             return smallview.getengine();              }         });             }   catch(exception ex){}               } 

webview support ajax.

  1. run following app.
  2. click on "load data server div" button.
  3. page refreshed data fetched server.

ajaxwebview

import javafx.application.application; import static javafx.application.application.launch; import javafx.scene.scene; import javafx.scene.web.webview; import javafx.stage.stage;  public class webviewajax extends application {   public static void main(string[] args) { launch(args); }   @override public void start(stage stage) {     webview webview = new webview();     webview.getengine().load("http://www.jquerysample.com/#basicajax");      final scene scene = new scene(webview);     stage.setscene(scene);     stage.show();   } } 

Comments