Questions tagged [jsobject]

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

101 questions
21
votes
3 answers

Why is getWindow() not able to be resolved?

I can't resolve the getWindow(); method for some reason... import java.applet.Applet; import netscape.javascript.JSObject; public class Class466 { public static void method6020(Applet applet, String string, int i) throws Throwable { …
Hello World
  • 1,379
  • 4
  • 20
  • 41
9
votes
5 answers

Not able to resolve JSObject in a java applet project

I am trying to call JSObject.getWindow(this) in the init method of JApplet but it is not able to resolve the symbol getWindow. this problem is specifically happening with a javafx application project created through netbeans , getWindow is getting…
deovrat singh
  • 1,220
  • 2
  • 17
  • 33
8
votes
4 answers

How to sort a JS object of objects?

I have built an object in PHP, used JSON_encode function and send it as a JSON string to my JS script via ajax. Then I convert it back to an object. The problem I am having is that I wanted to keep the object in the order that it was originally…
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
5
votes
2 answers

JavaFX JSObject stop working after a few minutes?

I'm making a web based app with Java support for some particular requests (e.g. print without choosing the printer everytime) and there is something that id driving me crazy. I use JavaFX for instantiate the browser object and everything works fine,…
Matt Chad
  • 75
  • 6
5
votes
3 answers

Javascript bridge / upcall to JavaFX (via JSObject.setMember() method) breaks when distributing

The Problem I spent several hours trying to determine why my distributed code fails and yet my source code when debugging with the IDE (NetBeans) works without issue. I have found a solution and am posting to help others that might have similar…
DatuPuti
  • 629
  • 7
  • 17
5
votes
1 answer

Play2 add new field to JsObject

Is it possible to add new field to JsObject? val jsonObj = Json.obj() jsonObj.put("field" -> 100) <==== Somthing like this I have a lot of methods that add new fields. How can I dynamically create JsObject?
Michał Jurczuk
  • 3,728
  • 4
  • 32
  • 56
5
votes
1 answer

Which JSObject should I be using?

I'm trying to make a Java applet interact through javascript in its enclosing environment. Up until now, I've been using netscape.javascript.JSObject as the type to deal with calls to Java functions from JS, but I've just discovered that there's…
rtpg
  • 2,419
  • 1
  • 18
  • 31
4
votes
1 answer

WKWebView evaluateJavaScript returns wrong JavaScript Object

I'm making a hybrid app and using WKWebView. I need to pass a JavaScript Object to the emitter command to open the edit dialog. Here is my code: let statDict: [String: Any] = [ "income" : account.stat.income, …
4
votes
3 answers

How to convert from JSObject to Map (viceversa) or list JSObject members

In Javascript i have the following code: var r=applet.foo({var0:99,var1:'foo',var2:applet}); In my Java applet i have the following: public JSObject foo(JSObject args){ System.out.println("The function is correctly invoked"); //In fact, the…
user1504906
  • 41
  • 1
  • 2
4
votes
2 answers

Where is plugin.jar for Java 7 for OSX

If you're using Java < 1.7 on OS X and you need to use JSObject for connecting an applet to JavaScript, you can find it in in $JAVA_HOME/jre/lib/plugin.jar. The "plugin.jar" archive doesn't seem to exist on Java 1.7 for OS X (as packaged by Oracle).…
Geoffrey Wiseman
  • 5,459
  • 3
  • 34
  • 52
3
votes
1 answer

How come setTimeout still calls callback after object deletion

I had a question, and wondered if you called setTimeout from an object, then deleted the object, would the setTimeout callback still be called? Apparently yes. var container = { timer: { // the object to be deleted start: function() { …
dwb
  • 2,136
  • 13
  • 27
3
votes
0 answers

Invalid data when adding to Firebase's Firestore

I have a project where I am adding data from a POS system to firebase. I have been adding the JSON returned from an API call to the POS to the Firebase realtime database without issue but not want to use the Cloud firestore. I have a very crude node…
chinds
  • 1,761
  • 4
  • 28
  • 54
3
votes
1 answer

Play 2.3.x Scala - How to display json data on view?

I am coming from the Node world and I am having trouble wrapping my head passing json to the view and then displaying data. I am hitting an api to fetch 2 profiles. The res.body is json. The response is fairly large - but now I only want to display…
3
votes
1 answer

Cannot Find getWindow(Applet) in netscape.javascript.JSObject

I am trying to call JavaScript functions from a JApplet. I've searched through tutorials and they say that I need to import and use netscape.javascript.* from my \jre\lib\plugin.jar I did import netscape.javascript.* and I'm using DrJava, and it…
darolandi
  • 71
  • 10
3
votes
1 answer

javascript convert object string to string

I cannot convert JS object to exact string, my code: jsonObj['payment_value']=100.10; jsonObj['payment_date']="2012-06-15"; jsonObjStr = JSON.stringify(jsonObj); alert(jsonObjStr); $.post("test", jsonObjStr.toString(), function(output){ …
Markoj
  • 233
  • 2
  • 7
1
2 3 4 5 6 7