Opened 8 years ago

Last modified 6 years ago

#17780 new defect

ContentPane always returns true for isLoaded()

Reported by: awallat Owned by:
Priority: undecided Milestone: 1.15
Component: DojoX Layout Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:


When I create a ContentPane? using declarative markup , e.g.:

<div data-dojo-type="dojox/layout/ContentPane" />

then this widget returns true when I call the function isLoaded(), although no content and no href was given. I tried to track it down and found out that the _WidgetBase wants to set the content-Attribute (which is responsible that a contentPane is marked loaded). I don't know where it gets this attribute since it is nowhere defined.

I used Chrome 33 and Dojo 1.9.3. I am in the progress of migration from Dojo 1.5.3. In my code I check if the content in a pane was already loaded so that I can skip the initialisation. Since the function now always returns true, the 'real' content never will be loaded.

Is this a bug? Otherwise I have to find a workaround. Thanks!

Change History (3)

comment:1 Changed 8 years ago by bill

There is no isLoaded() method, only an isLoaded flag. Is that what you are talking about?

The flag is set to true for your example, and I suppose it's a bug, according to the definition of isLoaded:

// isLoaded: [readonly] Boolean
//		True if the ContentPane has data in it, either specified
//		during initialization (via href or inline content), or set
//		via set('content', ...) / set('href', ...)
//		False if it doesn't have any content, or if ContentPane is
//		still in the process of downloading href.

When the ContentPane? is created _setContentAttr() is called with an empty #document-fragment, and that calls _onLoadHandler() which sets isLoaded to true.

comment:2 Changed 7 years ago by dylan

Component: DijitDojoX Layout
Milestone: tbd1.12

comment:3 Changed 6 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.