[Zope] Re: Embedding java applet into python Product
josef.meile at imes.mavt.ethz.ch
Wed May 12 04:53:33 EDT 2004
> Create a public method inside your product class that renders just the
> binary, i.e 'jclass_binary'.
> Then you use, according yo your appletHeader method:
> self.absolute_url() + '/jclass_binary'
> ... as the url that you need in the 'code' attribute of the applet tag.
I don't know how this binary rendering should be done. This is what I
"""Returns the binary data"""
"""Renders the applet tag"""
<applet code="%s" width="%s" height="%s"
<param name="showValue" value="no">
<param name="sampleHeight" value="10">
<param name="bgColor" value="%s">
But I didn't succeded. The applet isn't started. When I call the method
loadAppletClass alone, then I see the binary data of the applet.
> Have in mind that by doing this way you won't be able to manage the
> settings of the binary, unless you deal with that within the method
> so chances are that you'll prefer to upload your java class as a visible
> zope file.
Yes, I've already thaugth about it, but I don't like this way because
when the user uninstalls the product, the java applet will remain
somewhere on the zope DB.
Another way is to store the java applet on the "Control_Panel/MyProduct"
folder on the initialization time, which I've done, but then I have to
use this path on the "applet" tag and I don't like it because it exposes
the "Control_Panel" folder (ie: malicious bots will see it).
More information about the Zope