Embedding an Applet inside an ITMill Application

Hi,

I am using ITMill 5.3.1 and JBoss 4.0.5.

I need to embed an Applet (telnet and ssh in this case) into my ITMill application.

  1. I have searched for, and found a number of references to how an Applet can be Embedded into an ITMill application - can anyone tell me which ones (if any) will work with 5.3.1, and which one is the simplest/best approach (see list below) ?

  2. Is it possible to embed the Applet inside an ITMill modal dialog, so that it looks like it is part of that dialog ?

  3. If embedding in a modal dialog is possible, when I close the modal dialog, can I force the Embedded Applet to be closed ?

Many Thanks,
Andrew

The references are below:

  1. The source referred to in Samis’ example posted here
    Sami - is the source available, and would it be suitable ?:
    http://forum.itmill.com/posts/list/679.page

  2. The renderEmbedded() code written by Marc here:
    http://forum.itmill.com/posts/list/140.page

  3. Using a Label or Embedded Component as suggested
    here by Marc. If this is applicable, could any details be provided
    on how to code the Label or Embedded solution ?
    http://forum.itmill.com/posts/list/484.page

  4. Not sure how applicable the jsp solution might be
    that is described here - any comments ?:
    http://forum.itmill.com/posts/list/715.page

Hi andrewv,

Yes, the I can make the code available… just haven’t got the time for it yet.

For a background info about applets with IT Mill Toolkit:

From IT Mill Toolkit most implementations here inherit from the Embedded component. That is the easy part… at least for me it was :slight_smile:

The small annoying things are in the JavaScript-Applet communication, which is needed to make the applet to fit into GWT and this “single-page” web application structure:

  • In general, applet can be only added once to a single DOM document with JavaScript
  • Also, applet parameters cannot be changed after the first added to DOM
  • Communication between JavaScript must be in separate “messaging thread”. Otherwise the applet functions will inherit the security permissions of JS code when invoked

(When I talk about JavaScript here, I also mean the GWT code/widgets)

Also make sure that you use at least 5.3.1 version of IT Mill Toolkit as the previous versions had a layouting problem that made the applet re-added to DOM and broke first rule above.

In my screenshot demo I made a more generic applet widget that tried to circumvent these restrictions. I’m lacking the time to package this accordingly, but I can send the raw code if it helps you.

Sami,

Thanks for the background info :slight_smile:

It would be great if you could post or email any code you can to get me started ! :slight_smile:

I am using 5.3.1 - thanks for the tip about the layout issue in older versions !

Thanks
Andrew

Sami,

Would it be possible for you to email or put the sample Applet code you wrote into the incubator ?

Thanks
Andrew