Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#9179 closed defect (fixed)

Dojo 1.3 ContentPane double loads data if it is manually refreshed()

Reported by: Phil DeJarnett Owned by:
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0
Keywords: Cc:
Blocked By: Blocking:

Description

The updated ContentPane? attempts to reload the first time it is made visible, even if refresh() is called manually (say, to pre-load a dijit.Dialog). This is because _hrefChanged gets set when the ContentPane? is created, but doesn't get cleared in refresh().

The fix is simple, add "delete this._hrefChanged" to the refresh() function.

Alternatively, change line 365 in _loadCheck to:

(!this.isLoaded || this._hrefChanged) && this.refreshOnShow &&

This change would give refreshOnShow the ability to override any internal changes to allow manual loading.

Change History (2)

comment:1 Changed 10 years ago by bill

Milestone: tbd1.4
Resolution: duplicate
Status: newclosed

Yup, same as #9121 (although that ticket is marked for Dialog whereas as you've said the real problem is in ContentPane).

comment:2 Changed 10 years ago by bill

Resolution: duplicatefixed

(In [17376]) refresh() should clear the this._hrefChanged flag, since that's really a flag to indicate that a load is needed.

Also moved some code from _setContents() to destroyDescendants() about erasing state information about the contents.

Fixes #9129, #9179 !strict.

Note: See TracTickets for help on using tickets.