This discussion is archived
3 Replies Latest reply: Jun 10, 2013 10:24 AM by jlaskey RSS

Call JavaScript method in FXML from java controller

Ertong Newbie
Currently Being Moderated
I have fxml like
   <fx:root type="javafx.scene.Group" xmlns:fx="">
        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

NetBeans see this class. But while building the project i have an error
error: package 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


  • Correct Answers - 10 points
  • Helpful Answers - 5 points