JavaScript cannot access data on the server. For that you need something like AJAX. AJAX will submit a
JSF form (or partial form) and return with a partial page update with the current data values as of the time the AJAX request/response was made.
If you change the div whose ID is "mycube" to be a JSF h:panelGrid control (a div is basically a 1x1 grid) and use the f:ajax qualifier on a form submit control with a "render="mycube"", then you'll get the updates values set in the sub-elements of mycube..
And, just to be tiresome, I'll point out that despite what NetBeans may say, JSF backing beans are
Models and
not Controllers. In JSF, the Controllers are part of JSF itself and not application code.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.