2 Replies Latest reply on Oct 18, 2009 5:03 PM by nimo stephan

    javaFX Applet does not load when rendered-property is used

    nimo stephan Master

      I have a javaFX-Applet which works well.

      But it does not load, when using such code:


      <a4j:commandLink value="show Applet" reRender="panelApplet">
      <a4j:actionparam name="viewApplet" value="true" assignTo="#{myBean.renderApplet}"/>

      <a4j:outputPanel id="panelApplet">

      <a4j:outputPanel rendered="#{myBean.renderApplet}">



      javafx(
      {
      archive: "applets/myApplet.jar",
      draggable: false,
      width: 200,
      height: 100,
      code: "com.Main",
      name: "myApplet"
      }
      );


      </a4j:outputPanel>
      </a4j:outputPanel>

      I get this failure:

      netscape.javascript.JSException: No such method "fxAppletStarted" on JavaScript object
       at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
       at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
       at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)
       at com.sun.javafx.runtime.adapter.Applet.hideOverlay(Unknown Source)
       at com.sun.javafx.runtime.adapter.AppletStartupRoutine.run(Unknown Source)
       at com.sun.javafx.tk.swing.SwingToolkit$StartupRoutine.run(Unknown Source)
       at java.awt.event.InvocationEvent.dispatch(Unknown Source)
       at java.awt.EventQueue.dispatchEvent(Unknown Source)
       at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
       at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
       at java.awt.EventDispatchThread.run(Unknown Source)



      The Applet renders well, when not using rendered-Property. (However I need a rendered-Property as I want to view the applet only if rendered-Property is true.)

      Using a common applet (not java FX) all works well. But using JAVA-FX-Applet in combination with rendered-property (or c:if-Tag), the error above occurs and the applet is not rendered.

      Is the error AJAX/RichFaces related or JAVA FX related?

        • 1. Re: javaFX Applet does not load when rendered-property is us
          nimo stephan Master

          It does not load, when using such code:

          <a4j:commandLink value="show Applet" reRender="panelApplet">
          <a4j:actionparam name="viewApplet" value="true" assignTo="#{myBean.renderApplet}"/>
          
          <a4j:outputPanel id="panelApplet">
          
          <a4j:outputPanel rendered="#{myBean.renderApplet}">
          
          <script src="http://dl.javafx.com/1.2/dtfx.js"></script>
           <script>
           javafx(
           {
           archive: "applets/myApplet.jar",
           draggable: false,
           width: 200,
           height: 100,
           code: "com.Main",
           name: "myApplet"
           }
           );
          </script>
          
          
          </a4j:outputPanel>
          </a4j:outputPanel>




          • 2. Re: javaFX Applet does not load when rendered-property is us
            nimo stephan Master

            It does not load, when using such code:

            <a4j:commandLink value="show Applet" reRender="panelApplet">
            <a4j:actionparam name="viewApplet" value="true" assignTo="#{myBean.renderApplet}"/>
            </a4j:commandLink>
            
            <a4j:outputPanel id="panelApplet">
            
            <a4j:outputPanel rendered="#{myBean.renderApplet}">
            
            
            <script src="http://dl.javafx.com/1.2/dtfx.js"></script>
             <script>
             javafx(
             {
             archive: "applets/myApplet.jar",
             draggable: false,
             width: 200,
             height: 100,
             code: "com.Main",
             name: "myApplet"
             }
             );
            </script>
            
            
            </a4j:outputPanel>
            </a4j:outputPanel>