java - How to access javafx arraylist into javascript -


i creating application in javafx. have arraylist in java , want pass list webview. trying using code

webengine.executescript(" showallserver(' "+ addserver.showserver() + " ') "); 

my java code working fine. addserver.showserver() has arraylist like:

[hello world, gfgf, rtyh5jhj, new server, server name, hello, server1, gfgfg, ] 

my javascript code is:

window.onload = function showallserver(readlist)                 {                     var options = '';                      (var = 0; < readlist.length; i++) {                        options += '<option value="' + readlist[i]+ '">' + readlist[i] + '</option>';                     }                      $("#server_name").html(options);                  }; 

and html part:

    <select id="server_name" class="selectbox">      <option value="-1" style="display:none;">select</option>     </select> 

is possible access arraylist using javascript.am doing somthing wrong?


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -