EVALUATION
Added support for the "Packages" keyword against the applet object,
providing the necessary scoping to allow access to user-level classes
including static fields, static methods and instantiation of new
objects. The syntax looks like:
applet1.Packages.com.company1.HelperClass.staticField
or
new applet1.Packages.com.company1.HelperClass()
where "applet1" is the ID of the applet defined on the web page.
The changes needed were to keep track of which object is the top-level
object (i.e., the applet) exported to the web browser, and to inject
support for the magic "Packages" keyword against only that object,
returning a new top-level JavaNameSpace object for that field fetch.
All of the other necessary infrastructure was already in place.
Verified the new functionality both in IE and Firefox 3.
|