Opened 15 years ago

Closed 15 years ago

#3442 closed defect (fixed)

ContentPane Overlapping requests

Reported by: Dustin Machi Owned by: bill
Priority: high Milestone:
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Dustin Machi)

Multiple requests to show a content pane can cause the page to load from the server more than once. This comes about in a fairly common case of placing a few content panes in a container (my test uses page container)and then showing any one of them at a time. When the page loads each of the hrefs for each content pane is loaded as expected. When the PageContainer? initializes it selects one of the widgets (the first one). Since the page has already been loaded, i expect it to just go to that page. The actual behavior is that it loads the page again. When these pages contain widgets it causes them to be parsed,created,destroyed,parsed created in a small period of time and in some cases can have other adverse affects in an app. Subsequent switching of the page uses the cache normally. I expect this error to be somewhere in the area of not aborting the original request properly when the next one came along.

Putting in a delay of course works around this issue when the developer is selecting a child (for example, in the test file below if you put a setTimeout of 300 ms, it will let the first one complete and the second one will be served from cache. However, since the page container shows one by default (and presumably tab container and the other containers do as well), avoiding this double load is not possible in this circumstance

Test Page:

Change History (3)

comment:1 Changed 15 years ago by Dustin Machi

Component: GeneralDijit
Description: modified (diff)
Owner: changed from anonymous to bill

comment:2 Changed 15 years ago by Dustin Machi

(In [9167]) change the error thrown by a deferred on cancel so we can identify it is of this type. refs #3442

comment:3 Changed 15 years ago by Dustin Machi

Resolution: fixed
Status: newclosed

(In [9168]) when abort is called on a content pane, make it cancel the deferred. fixes #3442

Note: See TracTickets for help on using tickets.