3 Replies Latest reply on Jun 10, 2013 5:24 PM by Jlaskey-Oracle

    Call JavaScript method in FXML from java controller

      I have fxml like
         <fx:root type="javafx.scene.Group" xmlns:fx="http://javafx.com/fxml">
              function applyState(oldState, newState)
      and controller to it.

      The idea is to move some view logic to fxml file.
      So, when I need to change some view state, I want to call applyState from java code.
      The question is how to do it.

      What I have found:

      We can get
      and receive sun.org.mozilla.javascript.internal.InterpretedFunction.

      NetBeans see this class. But while building the project i have an error
      error: package sun.org.mozilla.javascript.internal does not exist

      But this class really exists in rt.jar in JRE.
      After that I have stopped digging into this.
      I suspect that using internal API is not a good idea to call this InterpretedFunction.

      Can somebody suggest how can I make such an invocation?

      Edited by: 940811 on Nov 19, 2012 11:21 PM