United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6998409 Investigate LiveConnect for Applet2/Applet support
JDK-6998409 : Investigate LiveConnect for Applet2/Applet support

Details
Type:
Enhancement
Submit Date:
2010-11-09
Status:
Closed
Updated Date:
2012-05-22
Project Name:
JDK
Resolved Date:
2012-05-22
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7-client
Fixed Versions:
7u2 (b03)

Related Reports
Backport:
Relates:

Sub Tasks

Description
We need to investigate LiveConnect implementation and decide how to make it work with Applet2/Applet.

                                    

Comments
EVALUATION

LiveConnect support is to expose Java object to javascript. The implementation is general in a way that JS interface are through reflection and should work as expected as long as we return real applet object.

Current Applet2Adapter works for LiveConnect as we return the real applet object from Applet2Adapter.getApplet(). The return type need to be changed to Object rather than current Applet to support Applet2 interface in addition to awt.Applet.
                                     
2010-12-22
SUGGESTED FIX

The following fix is pening to CR 6998411 and 6998413. Once we clear those two, following fix will work for LiveConnect.

diff -r 77e5029c740d src/common/share/classes/com/sun/deploy/uitoolkit/Applet2Adapter.java
--- a/src/common/share/classes/com/sun/deploy/uitoolkit/Applet2Adapter.java     Wed Dec 22 18:58:36 2010 -0800
+++ b/src/common/share/classes/com/sun/deploy/uitoolkit/Applet2Adapter.java     Tue Dec 28 12:07:11 2010 -0800
@@ -105,8 +105,8 @@
     // Igor's insist there is no need to have this method, and insist we to have
     // Applet here as a compromise before we work out the issues.
     // It should be Object instead of Applet for the real applet object
-    public Applet getApplet() {
-        return (Applet) applet;
+    public Object getApplet() {
+        return applet;
     }

     /**
                                     
2010-12-28
SUGGESTED FIX

getLiveConnectObject() method is added, Applet2Adapters implementation will decide what is the proper object to expose for LiveConnect support. For legacy java.awt.Applet, it is Applet itself. For FX, it will be the user class implement the application instead of the FXApplet2Adapter.

Webrev can be find at
http://sa.sfbay.sun.com/projects/deployment_data/7-client/6998409/
                                     
2011-06-21



Hardware and Software, Engineered to Work Together