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.

86 questions
20
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,249
  • 4
  • 20
  • 40
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,192
  • 2
  • 15
  • 32
8
votes
5 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
  • 13,565
  • 31
  • 87
  • 146
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,468
  • 4
  • 28
  • 53
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,301
  • 14
  • 30
4
votes
1 answer

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
  • 65
  • 6
4
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
  • 591
  • 6
  • 16
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
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() { …
dantechguy
  • 1,561
  • 7
  • 21
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
  • 9
3
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
  • 4,632
  • 3
  • 28
  • 46
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
  • 195
  • 1
  • 7
2
votes
0 answers

JSObject dependent applet - Using applet viewer at development time

I am using Java Plug-in and JSObject for DOM/JS <-> Applet communication. I am using Eclipse IDE and at development time, I like the simplicity of Run/Debug As->Applet to launch and quickly see my layout/changes reflected in the running applet. But…
Amol Katdare
  • 6,484
  • 2
  • 30
  • 36
2
votes
3 answers

Updating objects of array in array with array of Object

I have a two javaScript Array let x = [ { id: 'Abc', children: [ { id: 12, name: 'john' }, { id: 13, name: 'dow' } ] …
1
2 3 4 5 6