Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[atf-dev] IBM AJAX Toolkit question

we have following problem:

we have a java/eclipse app which used mozilla through ATF toolkit
(eclipse/ibm) and XULRunner
we can use all mozilla functionality through the java api
what we need is:
1) how to create XPCOM components in java (with sample best)
2) how to call our java application code from javascript within mozilla.
3)how to call  javascript code from our java application.

<Adam Peller> apeller@xxxxxxxxxx

You're using our Mozilla browser editor plugin, not as a preview tool in
the IDE, but as a part of your application runtime?  Very interesting.

I believe we have only covered item #1 in our use of xulrunner.  Look in
MozillaDebugPlugins.createDebuggerService() for an example
(org.eclipse.atf.mozide.ide.debug plugin)  You'll see we can instantiate
XPCOM services, but only standard Mozilla ones built into the xulrunner's
jar and exposed to Java; if you want more than that, you're out of luck
(this is more of a JavaXPCOM question than ATF-related at this point)

Regarding #2, I don't know of any direct way to do it, but you can do
things like fire DOM events and then have your Java code register
DOMEventListeners through the well-known DOM interface (again, you're sort
of limited to interactions through the provided Mozilla XPCOM classes)

Regarding #3, we haven't figured that one out either.  I think you want
eval, but I'm not sure how you'd get there with any meaningful context.

Back to the top