Opened 15 years ago

Closed 14 years ago

#1866 closed defect (wontfix)

Tab container behavior on widget id collisions in remotely loaded page

Reported by: [email protected] Owned by: koranteng
Priority: high Milestone: 1.0
Component: Dijit Version: 0.4
Keywords: Cc:
Blocked By: Blocking:


I have a tab container, where the second tab remotely loads a page (via href in LinkPane?). This remotely loaded page itself contains a tab container. If this remote page used the same id for tab container as the main page, clicking on the second tab ends up modifying the tabs for this page - the tabs from the remotely loaded page get added to this tab container!

Is this by design? This behavior was not there in version 3.1. IMHO, remotely loaded page should not be allowed to modify this page - even if they happen to use same widget ids.

Change History (6)

comment:1 Changed 15 years ago by bill

Milestone: 0.7

Hmm, I think all bets are off if you try to have two widgets w/the same id. If not for this problem, then something else isn't going to work.

comment:2 Changed 15 years ago by [email protected]

As I work more with Dojo 0.4, I am discovering its a bigger problem than I initially thought. You can never expect a remotely loaded page to use totally different widget IDs, for two reasons: 1) You may not control the remote page content - it might be coded by a different team, or it might link to a different site altogether, which also happen to use Dojo. 2) Even if you do control the content, you might load the same remote page, passing a different parameter.

To give an example of schenario 2, consider a customer details display. One of the tabs on customer display is pending orders for the customer. After you click on pending orders tab, each of the pending orders show as different (sub)tab. Each of these subtabs load the same order details href, but passing a diffrent order id. Since they are all part of the same big page, something somewhere is going to get screwed up.

In short, the remotely loaded page, should have its own scope/namespace, to prevent collisions. I guess thats the way it worked in Dojo 3.1.

Please note I am using "scope/namespace" as a generic term here - I am not sure if they have a specific meaning in JavaScript?. Never worked much on JavaScript?, and thanks to Dojo, I'll never have to :-)

comment:3 Changed 15 years ago by dylan

Milestone: 0.70.6

Milestone 0.7 deleted

comment:4 Changed 15 years ago by Adam Peller

Owner: changed from bill to koranteng

comment:5 Changed 15 years ago by Adam Peller

Component: WidgetsDijit

comment:6 Changed 14 years ago by bill

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.