View Full Version : Using Shims

17 Mar 2011, 11:49 AM
Does anyone have a sample that uses shims to display dialogs over an embedded object such as an applet or a PDF document? I have tried a bunch of stuff but nothing seems to be working.

Here is my scenario in a nutshell:

Inside of our application we have a 3rd party PDF viewer which is an applet. This applet is actually included into the application in an iFrame which loads a JSP that contains the applet tag. The applet tag is reasonably complex and dynamic, not too mention we already had the JSP to work with :). We have dialogs, message boxes, and other dynamic content that needs to be shown. Currently we are hiding the applet whenever the content needs to be displayed where the applet reside. Although this is mildly annoying it hasn't been an issue. However we have a new requirement where we need to be able to display the document and a dialog at the same time.

I played around with using shims, I essentially added the following to the top of my onModuleLoad:

GXT.useShims = true;

This didn't quite do what I wanted. In Chrome it worked beautifully, in Firefox it displayed the contents of my dialog but not the frame or the control buttons, and in IE it simply hid the applet. I have tried removing the shim from the HtmlContainer that contains the applet, explicitly adding the shim to the dialog, and calling the sync method of the dialog. None of these worked. So if anyone has a working example of this I would greatly appreciate it.