0

Applet and CodeBase

asked 2009-06-16 10:15:11 +0800

sousa1981 gravatar image sousa1981
573 4

The following code works

<window id="testeForm" title="Hello World!!" border="normal" width="250px" use="TesteForm">

	<label value="You are using: ${desktop.webApp.version}" />
	
	<applet codebase="/appletdemo2/applets/" code="PrinterManagerApplet.class" id="applet2" width="1px" height="1px" />

	<button label="Start" onClick='applet2.invoke("start");'/>

</window>

But when trying to create it from RichLets, there is no codebase getter and settter. Is this an bug? How can I set code base from Richlets?

Applet applet = new Applet();
applet.setId("applet2");
applet.setWidth("1px");
applet.setHeight("1px");
applet.setCode("PrinterManagerApplet.class");
// TODO: Where is CodeBase??

delete flag offensive retag edit

11 Replies

Sort by ยป oldest newest

answered 2009-06-17 10:49:59 +0800

sousa1981 gravatar image sousa1981
573 4

Let me post it to bug list?!

link publish delete flag offensive edit

answered 2009-06-17 11:38:11 +0800

sousa1981 gravatar image sousa1981
573 4

Bug ID 2807657

link publish delete flag offensive edit

answered 2009-06-18 03:28:41 +0800

kindalu gravatar image kindalu
255

Sorry I didn't quite understand the question.
in <applet codebase="xxxx"> there is no method called setCodebase in apple.java
but we can set the URI to setCode().

like this <applet code="APPLET/ticker.class" height="320" width="620"></applet>
(copy from http://docs.zkoss.org/wiki/ZkApplet)

codebase for?

link publish delete flag offensive edit

answered 2009-06-18 07:15:04 +0800

sousa1981 gravatar image sousa1981
573 4

Hi kindalu,

Just try the code posted. You can see <applet codebase="/appletdemo2/applets/" ...

You can replace the code with ticker, but create folder applets and put ticker applet inside the folder.

When you try in java mode there is no getter and setter for codebase.

link publish delete flag offensive edit

answered 2009-06-18 07:25:34 +0800

sousa1981 gravatar image sousa1981
573 4

I am using Firefox 3.0.10 and ZK 3.6.2 FL 06/17

Suppose my web application is appletdemo2 and I have an folder called applets which contain applets:

First Case: WORK: <applet codebase="/appletdemo2/applets/" code="PrinterManagerApplet.class"...
Second Case: NOT WORK <applet code="applets/PrinterManagerApplet.class"...
Third Case: NOT WORK <applet code="/appletdemo2/applets/PrinterManagerApplet.class"...

As you can see, the code base is necessary.

See http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet.html

See http://www.htmlcodetutorial.com/applets/_APPLET_CODEBASE.html
CODEBASE indicates the path to the directory of the applet class. CODEBASE is used for telling how to find the class file when it is not in the same directory as the web page. Do not use CODE to indicate the path, use CODEBASE.

My target main browser after project finish are IE 6, IE 7 and IE 8

link publish delete flag offensive edit

answered 2009-06-18 09:06:43 +0800

kindalu gravatar image kindalu
255

Thank for explaining. fixed.

link publish delete flag offensive edit

answered 2009-06-18 12:39:57 +0800

sousa1981 gravatar image sousa1981
573 4

Hi kindalu,

It is fine to know you fixed it.

I hope applet component support IE 6, 7 and 8. Let me post it as separated request.

link publish delete flag offensive edit

answered 2009-06-18 12:45:21 +0800

sousa1981 gravatar image sousa1981
573 4

Posted as Feature ID: 2808351 Applet support IE8

Please see problem with "Applet and setField", posted as Bug ID: 2807824

link publish delete flag offensive edit

answered 2009-06-19 12:44:43 +0800

sousa1981 gravatar image sousa1981
573 4

I tested and found that Applet component is not working in IE 7.

Just try the code above with codebase

link publish delete flag offensive edit

answered 2009-06-22 10:09:54 +0800

sousa1981 gravatar image sousa1981
573 4

Feedback after try ZK 3.6.2 FL 2009-06-19.

Firefox is OK
IE 7 NOT WORK. According to my code the applet must be initialized only
after an button be clicked, but IE 7 call applet before button was clicked,
and it started to infinitive progress bar of zk

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-06-16 10:15:11 +0800

Seen: 364 times

Last updated: Jun 29 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More