Login Register

What triggers the ContentPane loadingMessage property?

What triggers the loadingMessage property in dijit.layout.ContentPane? I’m loading a PDF into a ContentPane (dojo 1.1) using the following code:

tab.setContent("<object type='application/pdf' data=’myServlet’></object\>");

It can take my servlet up to 5 or 6 seconds to return the PDF, after which time the adobe reader plugin loads the reader frame, and the pdf is visible. However, while I’m waiting for the PDF to return, I never get the loadingMessage icon and message - just a blank ContentPane (same for both IE and FF).

I would expect the default .tundra .dijitContentPaneLoading animated gif and text message (Loading...). I've also tried to override the defaults - tab.loadingMessage("my loading message"). Neither works.

Is the loadingMessage trigger under browser/plugin control? Any suggestions on how to get the loadingMessage property to display while I’m waiting for the PDF to load?

So the loading message for

So the loading message for ContentPane reflects progress loading the content itself, which can be loaded remotely by href, and actually appears in the same place where the content ultimately goes. In this case, you're passing the content directly to the pane, so there is no delay and loading message (and no where to put it, the way the widget is written)

You're looking for some more complex interaction with the Adobe Acrobat player, which itself must be present on the page... I'm not sure if it is possible to make it invisible and put some sort of loading message in an overlay... or if it's possible to get an event from the Acrobat player when the load is finished? All of this is beyond the ContentPane widget, I think. Doesn't Acrobat provide its own loading feedback?

That makes sense. Since I'm

That makes sense. Since I'm putting the <object> tag directly into the pane, the pane has content. Therefore, there is no need for the loadingMessage to be displayed.

Unfortunately, I can't use setHref(), because I only want to hit my servlet and generate my PDF report once. Switching to a different tab and back again reloads the tab, thereby running my servlet again, and generating another report.

I steill don't have a solution, but will keep working on it.